From b60d21a51789d8e839bb0ca3acd6179b1a721b59 Mon Sep 17 00:00:00 2001 From: Jan Horstmann Date: Tue, 1 Oct 2019 13:25:56 +0200 Subject: [PATCH] Fix inventory_dns Dnsmasq does not re-read its config files on SIGHUP ([1]). Since a config directive (host-record) is used, a service restart is required in order for the record to be available. [1] "Notes [...] SIGHUP does NOT re-read the configuration file." - http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html Change-Id: I84ab94b6c1ae61fccc1b1aba5df52a000b1fa449 --- .../roles/bifrost-deploy-nodes-dynamic/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml index 12375f501..ff3bf0768 100644 --- a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml @@ -60,10 +60,10 @@ mode: 0644 when: inventory_dns | bool == true 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. - command: killall -HUP dnsmasq +- name: "Restarting dnsmasq" + service: + name: dnsmasq + state: restarted become: yes when: (inventory_dhcp | bool == true) or (inventory_dns | bool == true) - name: "Deploy to hardware - Using custom instance_info."