From f065310ca691845a12a28d7e04b19768961abf44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Sun, 15 Apr 2018 16:59:24 +0200 Subject: [PATCH] evolinux-users: use command instead of shell when possible --- evolinux-users/tasks/ssh_allowgroups.yml | 2 +- evolinux-users/tasks/ssh_allowusers.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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