537b78da1d
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>
14 lines
343 B
YAML
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
|