From 8abed3e25852ed15fcebbeb8ba3b1f9be4c5a758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Wed, 4 Apr 2018 23:22:46 +0200 Subject: [PATCH] Use "command" instead of "shell" where possible --- evolinux-base/tasks/ssh.yml | 2 +- evolinux-users/tasks/ssh.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/evolinux-base/tasks/ssh.yml b/evolinux-base/tasks/ssh.yml index e4f51a81..773de28f 100644 --- a/evolinux-base/tasks/ssh.yml +++ b/evolinux-base/tasks/ssh.yml @@ -70,7 +70,7 @@ # we must double-escape caracters, because python - 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 register: grep_allowusers_ssh diff --git a/evolinux-users/tasks/ssh.yml b/evolinux-users/tasks/ssh.yml index 16cb1f30..75b47ce2 100644 --- a/evolinux-users/tasks/ssh.yml +++ b/evolinux-users/tasks/ssh.yml @@ -27,7 +27,7 @@ when: user.ssh_keys is defined - 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 register: grep_allowgroups_ssh @@ -41,7 +41,7 @@ - block: # If AllowGroups is not present, we proceed as usual - 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 register: grep_allowusers_ssh