common: ssh tasks use the ssh unit that Ubuntu also has, cloud-init no longer rewrites /etc/hosts at boot

This commit is contained in:
2026-11-07 18:51:22 +00:00
parent 4abfea352c
commit 3290d843cc
3 changed files with 19 additions and 2 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
- name: Check if SSH daemon is active
systemd:
name: sshd
name: ssh
state: started
register: sshd_status
@@ -14,7 +14,7 @@
- name: Restart SSH daemon
service:
name: sshd
name: ssh
state: restarted
when: sshd_config.changed
when: sshd_status.status.ActiveState == 'active'