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
This commit is contained in:
Yolanda Robla 2015-12-16 15:18:41 +01:00
parent abccebdaed
commit 740b9fb254

View File

@ -21,6 +21,7 @@
template: src=dhcp-host.j2 dest=/etc/dnsmasq.d/bifrost.dhcp-hosts.d/{{ inventory_hostname }} template: src=dhcp-host.j2 dest=/etc/dnsmasq.d/bifrost.dhcp-hosts.d/{{ inventory_hostname }}
delegate_to: localhost delegate_to: localhost
when: inventory_dhcp | bool when: inventory_dhcp | bool
become: yes
- name: "Sending dnsmasq HUP" - name: "Sending dnsmasq HUP"
# Note(TheJulia): We need to actually to send a hup signal directly as # 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. # Ansible's reloaded state does not pass through to the init script.