|
|
@@ -1,4 +1,7 @@
|
|
|
-- name: add pk to user
|
|
|
- authorized_key:
|
|
|
- user: "{{ username }}"
|
|
|
- key: "{{ lookup('file', public_key) }}"
|
|
|
+- name: Disable empty password sshd login
|
|
|
+ lineinfile: dest=/etc/ssh/sshd_config regexp="^#?PermitEmptyPasswords" line="PermitEmptyPasswords no"
|
|
|
+ notify: restart sshd
|
|
|
+
|
|
|
+- name: Disable password sshd login
|
|
|
+ lineinfile: dest=/etc/ssh/sshd_config regexp="^#?PasswordAuthentication" line="PasswordAuthentication no"
|
|
|
+ notify: restart sshd
|