diff --git a/evolinux-users/tasks/ssh_allowgroups.yml b/evolinux-users/tasks/ssh_allowgroups.yml index c4d946a2..68635548 100644 --- a/evolinux-users/tasks/ssh_allowgroups.yml +++ b/evolinux-users/tasks/ssh_allowgroups.yml @@ -3,7 +3,7 @@ # this check must be repeated for each user # even if it's been done before - name: verify AllowGroups directive - shell: "grep -E '^AllowGroups' /etc/ssh/sshd_config" + command: "grep -E '^AllowGroups' /etc/ssh/sshd_config" changed_when: False failed_when: False check_mode: no diff --git a/evolinux-users/tasks/ssh_allowusers.yml b/evolinux-users/tasks/ssh_allowusers.yml index db113494..fff04f8c 100644 --- a/evolinux-users/tasks/ssh_allowusers.yml +++ b/evolinux-users/tasks/ssh_allowusers.yml @@ -3,7 +3,7 @@ # this check must be repeated for each user # even if it's been done before - name: verify AllowUsers directive - shell: "grep -E '^AllowUsers' /etc/ssh/sshd_config" + command: "grep -E '^AllowUsers' /etc/ssh/sshd_config" changed_when: False failed_when: False check_mode: no @@ -28,7 +28,7 @@ when: grep_allowusers_ssh.rc == 0 - name: "verify Match User directive" - command: "grep 'Match User' /etc/ssh/sshd_config" + command: "grep -E '^Match User' /etc/ssh/sshd_config" changed_when: False failed_when: False check_mode: no