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
1 changed files with 1 additions and 0 deletions

View File

@ -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.