blob: c4dd9eaccfaee7001f2f0c1d92ae8232f411a2ad (
plain) (
tree)
|
|
---
- name: Configure sshd
become: True
lineinfile:
dest: "/etc/ssh/sshd_config"
regexp: "{{ item.regex }}"
line: "{{ item.line }}"
notify: Restart sshd
loop:
- { regex: '^(#\s*)?PermitEmptyPasswords' , line: 'PermitEmptyPasswords no' }
- { regex: '^(#\s*)?PermitRootLogin' , line: 'PermitRootLogin no' }
- { regex: '^(#\s*)?PasswordAuthentication', line: 'PasswordAuthentication no' }
- { regex: '^(#\s*)?UsePAM' , line: 'UsePAM yes' }
|