From c5ffa65ca45f1a5a3b0c92d7a7fd03efefe05b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20K=C3=A1rolyi?= Date: Wed, 15 Mar 2017 02:51:58 +0100 Subject: [PATCH] Reloading dnsmasq after updated IPs in /etc/hosts --- tasks/jail/update_etc_hosts.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/jail/update_etc_hosts.yml b/tasks/jail/update_etc_hosts.yml index 6beff0e..e210fad 100644 --- a/tasks/jail/update_etc_hosts.yml +++ b/tasks/jail/update_etc_hosts.yml @@ -18,3 +18,8 @@ with_items: '{{ matching_hosts_files.stdout_lines }}' loop_control: loop_var: filename + +- name: Sending HUP to any dnsmasq process to reload their /etc/hosts + command: + /usr/bin/killall -HUP dnsmasq + failed_when: false