Merge pull request #466 from bogdando/fix_resolvconf

Fix updating resolvconf
pull/467/head
Antoine Legrand 2016-09-01 14:09:45 +02:00 committed by GitHub
commit 602dba45ea
2 changed files with 13 additions and 8 deletions

View File

@ -1,4 +1,11 @@
- name: Dnsmasq | restart network
command: /bin/true
notify:
- Dnsmasq | reload network
- Dnsmasq | update resolvconf
when: ansible_os_family != "CoreOS"
- name: Dnsmasq | reload network
service:
name: >-
{% if ansible_os_family == "RedHat" -%}
@ -7,4 +14,8 @@
networking
{%- endif %}
state: restarted
when: ansible_os_family != "CoreOS"
when: ansible_os_family != "RedHat" and ansible_os_family != "CoreOS"
- name: Dnsmasq | update resolvconf
command: /sbin/resolvconf -u
ignore_errors: true

View File

@ -127,11 +127,5 @@
- name: disable resolv.conf modification by dhclient
copy: src=dhclient_nodnsupdate dest=/etc/dhcp/dhclient.d/nodnsupdate mode=u+x
notify: Dnsmasq | restart network
when: ansible_os_family == "RedHat"
- name: update resolvconf
command: resolvconf -u
changed_when: False
when: resolvconf.rc == 0
- meta: flush_handlers