Fix handlers

This commit is contained in:
Alexander Gorelyshev
2026-06-08 14:14:09 +04:00
parent b87da747a7
commit 37222f515e
7 changed files with 24 additions and 13 deletions

View File

@@ -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'