roles/common: Use command module instead of shell

You should only use the "shell" module when you need shell functions
like flow control and redirects. Also, the "command" module is safer
because it is not affected by the user's environment.
This commit is contained in:
Alan Orth 2017-11-05 00:49:03 +02:00
parent 58598f470c
commit b87f2e2fb0
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 2 additions and 2 deletions

View File

@ -13,6 +13,6 @@
- name: Format public.xml firewalld zone file
when: ansible_distribution_major_version | version_compare('8', '>=')
shell: tidy -xml -iq -m -w 0 /etc/firewalld/zones/public.xml
command: tidy -xml -iq -m -w 0 /etc/firewalld/zones/public.xml
notify:
- reload firewalld

View File

@ -30,6 +30,6 @@
- name: Format public.xml firewalld zone file
when: ansible_distribution_version | version_compare('15.04', '>=')
shell: tidy -xml -iq -m -w 0 /etc/firewalld/zones/public.xml
command: tidy -xml -iq -m -w 0 /etc/firewalld/zones/public.xml
notify:
- reload firewalld