From 32c289d915212e06ebe8733c3ec1644a600986a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Sun, 15 Apr 2018 22:24:13 +0200 Subject: [PATCH] evolinux: improve case switching A case was missing : no AllowUsers/AllowGroups, on Debian 9 --- evolinux-users/tasks/ssh.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evolinux-users/tasks/ssh.yml b/evolinux-users/tasks/ssh.yml index 20eac23a..699c0686 100644 --- a/evolinux-users/tasks/ssh.yml +++ b/evolinux-users/tasks/ssh.yml @@ -24,9 +24,9 @@ - set_fact: # If "AllowGroups is present" or "AllowUsers is absent and Debian 9+", - ssh_allowgroups: "{{ grep_allowgroups_ssh.rc == 0 or (grep_allowusers_ssh.rc != 0 and (ansible_distribution_major_version | version_compare('9', '>='))) }}" - # If "AllowGroups is absent" - ssh_allowusers: "{{ grep_allowgroups_ssh.rc != 0 }}" + ssh_allowgroups: "{{ (grep_allowgroups_ssh.rc == 0) or (grep_allowusers_ssh.rc != 0 and (ansible_distribution_major_version | version_compare('9', '>='))) }}" + # If "AllowGroups is absent" and "Debian <9" + ssh_allowusers: "{{ (grep_allowgroups_ssh.rc != 0) and (ansible_distribution_major_version | version_compare('9', '<')) }}" - debug: var: ssh_allowgroups