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:
parent
58598f470c
commit
b87f2e2fb0
@ -13,6 +13,6 @@
|
|||||||
|
|
||||||
- name: Format public.xml firewalld zone file
|
- name: Format public.xml firewalld zone file
|
||||||
when: ansible_distribution_major_version | version_compare('8', '>=')
|
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:
|
notify:
|
||||||
- reload firewalld
|
- reload firewalld
|
||||||
|
@ -30,6 +30,6 @@
|
|||||||
|
|
||||||
- name: Format public.xml firewalld zone file
|
- name: Format public.xml firewalld zone file
|
||||||
when: ansible_distribution_version | version_compare('15.04', '>=')
|
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:
|
notify:
|
||||||
- reload firewalld
|
- reload firewalld
|
||||||
|
Loading…
Reference in New Issue
Block a user