From ef8a08206532590b791f2950c4b22b4f2f871e97 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 31 Aug 2019 22:40:16 +0300 Subject: [PATCH] Feat(sshd): In Debian the service is called `ssh`, otherwise `sshd` --- playbooks/debian/init-system2.yml | 2 +- playbooks/roles/sshd/handlers/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5