evolinux: improve case switching

A case was missing : no AllowUsers/AllowGroups, on Debian 9
This commit is contained in:
Jérémy Lecour 2018-04-15 22:24:13 +02:00
parent 5bcd7e44cf
commit 32c289d915

View file

@ -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