Skip to content
Snippets Groups Projects
Commit d240073f authored by Bogdan Dobrelya's avatar Bogdan Dobrelya
Browse files

Fix updating resolvconf


Move updating resolvconf to the network restart handler to
ensure changes applied to the /etc/resolv.conf.

Signed-off-by: default avatarBogdan Dobrelya <bdobrelia@mirantis.com>
parent 69f09e0f
No related branches found
No related tags found
No related merge requests found
- 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
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment