Merge pull request #466 from bogdando/fix_resolvconf
Fix updating resolvconf
This commit is contained in:
commit
4392bb25b0
2 changed files with 13 additions and 8 deletions
|
@ -1,4 +1,11 @@
|
||||||
- name: Dnsmasq | restart network
|
- name: Dnsmasq | restart network
|
||||||
|
command: /bin/true
|
||||||
|
notify:
|
||||||
|
- Dnsmasq | reload network
|
||||||
|
- Dnsmasq | update resolvconf
|
||||||
|
when: ansible_os_family != "CoreOS"
|
||||||
|
|
||||||
|
- name: Dnsmasq | reload network
|
||||||
service:
|
service:
|
||||||
name: >-
|
name: >-
|
||||||
{% if ansible_os_family == "RedHat" -%}
|
{% if ansible_os_family == "RedHat" -%}
|
||||||
|
@ -7,4 +14,8 @@
|
||||||
networking
|
networking
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
state: restarted
|
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
|
||||||
|
|
|
@ -127,11 +127,5 @@
|
||||||
|
|
||||||
- name: disable resolv.conf modification by dhclient
|
- name: disable resolv.conf modification by dhclient
|
||||||
copy: src=dhclient_nodnsupdate dest=/etc/dhcp/dhclient.d/nodnsupdate mode=u+x
|
copy: src=dhclient_nodnsupdate dest=/etc/dhcp/dhclient.d/nodnsupdate mode=u+x
|
||||||
|
notify: Dnsmasq | restart network
|
||||||
when: ansible_os_family == "RedHat"
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
- name: update resolvconf
|
|
||||||
command: resolvconf -u
|
|
||||||
changed_when: False
|
|
||||||
when: resolvconf.rc == 0
|
|
||||||
|
|
||||||
- meta: flush_handlers
|
|
||||||
|
|
Loading…
Reference in a new issue