c12s-kubespray/roles/dnsmasq/handlers/main.yml
Bogdan Dobrelya 537b78da1d Fix network restart
In order to apply dhclient hooks, drop network restarting as it is a too
heavy operation and may sometimes hang as well. Instead, kill dhclient
then refresh resolvconf. This postpones application of changes to
dhclient conf and hooks unless it is restarted, eventually.

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2016-08-30 11:22:04 +02:00

14 lines
343 B
YAML

- name: Dnsmasq | apply resolvconf
command: /bin/true
notify:
- Dnsmasq | kill dhclient
- Dnsmasq | update resolvconf
when: ansible_os_family != "CoreOS"
- name: Dnsmasq | kill dhclient
shell: kill -11 $(pidof dhclient)
ignore_errors: true
- name: Dnsmasq | update resolvconf
command: resolvconf -u
ignore_errors: true