Fix handlers
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: "Authentication | Configure SSH authentication settings"
|
||||
notify: Restart sshd
|
||||
notify: "Restart ssh"
|
||||
loop:
|
||||
- { regexp: '^#?\s*PubkeyAuthentication\s+', line: 'PubkeyAuthentication yes' }
|
||||
- { regexp: '^#?\s*PasswordAuthentication\s+', line: 'PasswordAuthentication {{ sshd_password_auth | ternary("yes", "no") }}' }
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
- name: "Authentication | override password authentication by cloud-init to '{{ sshd_password_auth | ternary('yes', 'no') }}'"
|
||||
when: sshd_cloud_init.stat.exists
|
||||
notify: Restart sshd
|
||||
notify: "Restart ssh"
|
||||
ansible.builtin.lineinfile:
|
||||
path: "/etc/ssh/sshd_config.d/50-cloud-init.conf"
|
||||
regexp: '^#?PasswordAuthentication'
|
||||
|
||||
Reference in New Issue
Block a user