Add role common

This commit is contained in:
2022-10-17 12:59:33 +02:00
parent c5288bdb4d
commit e7b0549468
5 changed files with 61 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
- 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