Use "command" instead of "shell" where possible

This commit is contained in:
Jérémy Lecour 2018-04-04 23:22:46 +02:00
parent 4382ce24f6
commit 8abed3e258
2 changed files with 3 additions and 3 deletions

View File

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

View File

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