Allow NM-controlled DNS if intended
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
86cd6f5b0e
commit
d12cedc5d3
3 changed files with 7 additions and 1 deletions
|
@ -265,3 +265,6 @@ nagios_Check_Services:
|
||||||
# Set variable if we want to use our global iptables defaults
|
# Set variable if we want to use our global iptables defaults
|
||||||
# Some things need to set their own.
|
# Some things need to set their own.
|
||||||
baseiptables: True
|
baseiptables: True
|
||||||
|
|
||||||
|
# Most of our machines have manual resolv.conf files
|
||||||
|
nm_controlled_resolv: False
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
# XXX fixme # a datacenter 'fact' from setup
|
# XXX fixme # a datacenter 'fact' from setup
|
||||||
- name: /etc/resolv.conf
|
- name: /etc/resolv.conf
|
||||||
copy: src={{ item }} dest=/etc/resolv.conf
|
copy: src={{ item }} dest=/etc/resolv.conf
|
||||||
|
when: not nm_controlled_resolv
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- "{{ resolvconf }}"
|
- "{{ resolvconf }}"
|
||||||
- resolv.conf/{{ inventory_hostname }}
|
- resolv.conf/{{ inventory_hostname }}
|
||||||
|
@ -53,7 +54,7 @@
|
||||||
ini_file: dest=/etc/NetworkManager/NetworkManager.conf section=main option=dns value=none
|
ini_file: dest=/etc/NetworkManager/NetworkManager.conf section=main option=dns value=none
|
||||||
notify:
|
notify:
|
||||||
- restart NetworkManager
|
- restart NetworkManager
|
||||||
when: ansible_distribution_major_version|int >=7 and nmclitest|success and ( not ansible_ifcfg_blacklist)
|
when: ansible_distribution_major_version|int >=7 and nmclitest|success and ( not ansible_ifcfg_blacklist) and not nm_controlled_resolv
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- resolvconf
|
- resolvconf
|
||||||
|
@ -124,6 +125,7 @@
|
||||||
|
|
||||||
- name: make sure our resolv.conf is the one being used - set RESOLV_MODS=no in /etc/sysconfig/network
|
- name: make sure our resolv.conf is the one being used - set RESOLV_MODS=no in /etc/sysconfig/network
|
||||||
lineinfile: dest=/etc/sysconfig/network create=yes backup=yes state=present line='RESOLV_MODS=no' regexp=^RESOLV_MODS=
|
lineinfile: dest=/etc/sysconfig/network create=yes backup=yes state=present line='RESOLV_MODS=no' regexp=^RESOLV_MODS=
|
||||||
|
when: not nm_controlled_resolv
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- base
|
- base
|
||||||
|
|
|
@ -29,3 +29,4 @@ IPV6_DEFAULTDEV={{item}}
|
||||||
IPV6_DEFAULTGW={{ hostvars[inventory_hostname][item + '_ipv6_gw'] }}
|
IPV6_DEFAULTGW={{ hostvars[inventory_hostname][item + '_ipv6_gw'] }}
|
||||||
IPV6_MTU=1280
|
IPV6_MTU=1280
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
DOMAIN="phx2.fedoraproject.org vpn.fedoraproject.org fedoraproject.org"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue