From 740b9fb254895fbd6ea69fced8bc622723c9e340 Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Wed, 16 Dec 2015 15:18:41 +0100 Subject: [PATCH] Use sudo to write dhcp hosts The directory is created with root ownership, but then the files are added by bifrost user. This causes to fail with permission denied. Adding become: yes to execute this task with sudo powers. Change-Id: Ia792033eef3553e05ca2d5df4b25cb64c7a009cb --- playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml index aa5df56a5..47885137c 100644 --- a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml @@ -21,6 +21,7 @@ template: src=dhcp-host.j2 dest=/etc/dnsmasq.d/bifrost.dhcp-hosts.d/{{ inventory_hostname }} delegate_to: localhost when: inventory_dhcp | bool + become: yes - name: "Sending dnsmasq HUP" # Note(TheJulia): We need to actually to send a hup signal directly as # Ansible's reloaded state does not pass through to the init script.