You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- name: Disable SSH password auth
|
|
lineinfile:
|
|
dest: /etc/ssh/sshd_config
|
|
regexp: '^PasswordAuthentication\s*yes'
|
|
line: "PasswordAuthentication no"
|
|
register: sshd_config
|
|
|
|
- name: Restart SSH daemon
|
|
service:
|
|
name: sshd
|
|
state: restarted
|
|
when: sshd_config.changed
|