From: Oleg Broytman Date: Sat, 31 Aug 2019 19:40:16 +0000 (+0300) Subject: Feat(sshd): In Debian the service is called `ssh`, otherwise `sshd` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=ef8a08206532590b791f2950c4b22b4f2f871e97;hp=86f60f40dd650fcf9ac23e40b9afa8357d00e2c2;p=ansible.git Feat(sshd): In Debian the service is called `ssh`, otherwise `sshd` --- diff --git a/playbooks/debian/init-system2.yml b/playbooks/debian/init-system2.yml index f28026d..0a02e31 100644 --- a/playbooks/debian/init-system2.yml +++ b/playbooks/debian/init-system2.yml @@ -1,6 +1,6 @@ - name: Setup Debain system - part 2 hosts: "{{ hosts | default('all') }}" - gather_facts: false + gather_facts: true roles: - init-system2 - remove-systemd diff --git a/playbooks/roles/sshd/handlers/main.yml b/playbooks/roles/sshd/handlers/main.yml index 9ec20b5..264fd31 100644 --- a/playbooks/roles/sshd/handlers/main.yml +++ b/playbooks/roles/sshd/handlers/main.yml @@ -1,5 +1,5 @@ - name: Reload sshd become: true service: - name: ssh + name: "ssh{{ ansible_facts.distribution != 'Debian' and 'd' or '' }}" state: reloaded