Use "command" instead of "shell" where possible
This commit is contained in:
parent
4382ce24f6
commit
8abed3e258
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue