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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user