From 0f9169284f9696e54976843c129030f3af8834f7 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Wed, 4 Nov 2020 19:49:49 +0100 Subject: [PATCH] Use command instead of shell --- roles/isc_dhcp_server/handlers/main.yml | 2 +- roles/isc_dhcp_server/tasks/main.yml | 3 ++- roles/radius/tasks/main.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/isc_dhcp_server/handlers/main.yml b/roles/isc_dhcp_server/handlers/main.yml index 840463c..7df6d92 100644 --- a/roles/isc_dhcp_server/handlers/main.yml +++ b/roles/isc_dhcp_server/handlers/main.yml @@ -1,5 +1,5 @@ - name: force run dhcp re2o-service - shell: /var/local/re2o-services/dhcp/main.py --force + command: /var/local/re2o-services/dhcp/main.py --force become_user: re2o-services - name: restart dhcpd diff --git a/roles/isc_dhcp_server/tasks/main.yml b/roles/isc_dhcp_server/tasks/main.yml index e198163..3a0fe8a 100644 --- a/roles/isc_dhcp_server/tasks/main.yml +++ b/roles/isc_dhcp_server/tasks/main.yml @@ -18,6 +18,7 @@ owner: re2o-services group: nogroup recurse: yes + mode: u=rwX,g=rX,o=rX - name: Install isc-dhcp-server apt: @@ -101,7 +102,7 @@ when: is_aurore_host - name: force run dhcp re2o-service - shell: /var/local/re2o-services/dhcp/main.py --force + command: /var/local/re2o-services/dhcp/main.py --force - name: Ensure dhcpd is running service: diff --git a/roles/radius/tasks/main.yml b/roles/radius/tasks/main.yml index b840b39..a5875b3 100644 --- a/roles/radius/tasks/main.yml +++ b/roles/radius/tasks/main.yml @@ -102,7 +102,7 @@ when: "'aurore_vm' in group_names" - name: Install radius requirements (except freeradius-python3) - shell: + command: cmd: "{{ item }}" chdir: /var/www/re2o/ loop: