diff --git a/tasks/main.yml b/tasks/main.yml index 5e21726..461bb6e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -31,5 +31,13 @@ state: present notify: restart ssh +- name: Disable plaintext password authentication + ansible.builtin.lineinfile: + path: /etc/ssh/sshd_config + regex: 'PasswordAuthentication' + line: 'PasswordAuthentication no' + state: present + notify: restart ssh + - name: "Set up {{ ansible_os_family }}-based systems" include_tasks: "setup-{{ ansible_os_family }}.yml"