2016-08-18 15:14:52 +00:00
|
|
|
- name: Dnsmasq | restart network
|
2016-08-29 14:39:55 +00:00
|
|
|
command: /bin/true
|
|
|
|
notify:
|
|
|
|
- Dnsmasq | reload network
|
|
|
|
- Dnsmasq | Wait for network reloaded
|
|
|
|
- Dnsmasq | update resolvconf
|
|
|
|
when: ansible_os_family != "CoreOS"
|
|
|
|
|
|
|
|
- name: Dnsmasq | reload network
|
|
|
|
vars:
|
|
|
|
ansible_ssh_pipelining: yes
|
2016-08-18 15:14:52 +00:00
|
|
|
service:
|
|
|
|
name: >-
|
|
|
|
{% if ansible_os_family == "RedHat" -%}
|
|
|
|
network
|
|
|
|
{%- elif ansible_os_family == "Debian" -%}
|
|
|
|
networking
|
|
|
|
{%- endif %}
|
|
|
|
state: restarted
|
2016-08-29 14:39:55 +00:00
|
|
|
register: network_runner
|
|
|
|
async: 600
|
|
|
|
poll: 0
|
|
|
|
|
|
|
|
- name: Dnsmasq | Wait for network reloaded
|
|
|
|
vars:
|
|
|
|
ansible_ssh_pipelining: yes
|
|
|
|
async_status: jid={{ network_runner.ansible_job_id }}
|
|
|
|
register: network_jobs
|
|
|
|
until: network_jobs.finished
|
|
|
|
retries: 60
|
|
|
|
delay: 10
|
|
|
|
|
|
|
|
- name: Dnsmasq | update resolvconf
|
|
|
|
command: /sbin/resolvconf -u
|
|
|
|
ignore_errors: true
|