main.yml 337 B

1234567
  1. - name: Disable empty password sshd login
  2. lineinfile: dest=/etc/ssh/sshd_config regexp="^#?PermitEmptyPasswords" line="PermitEmptyPasswords no"
  3. notify: restart sshd
  4. - name: Disable password sshd login
  5. lineinfile: dest=/etc/ssh/sshd_config regexp="^#?PasswordAuthentication" line="PasswordAuthentication no"
  6. notify: restart sshd