Rework the logic here a bit.
This commit is contained in:
parent
f62ab99cb1
commit
f0374f5251
2 changed files with 5 additions and 3 deletions
|
@ -41,6 +41,8 @@ eth0_nm: 255.255.255.0
|
||||||
eth1_nm: 255.255.255.0
|
eth1_nm: 255.255.255.0
|
||||||
br0_nm: 255.255.255.0
|
br0_nm: 255.255.255.0
|
||||||
br1_nm: 255.255.255.0
|
br1_nm: 255.255.255.0
|
||||||
|
# Default to managing the network, we want to not do this on select hosts (like cloud nodes)
|
||||||
|
ansible_ifcfg_blacklist: false
|
||||||
#
|
#
|
||||||
# The default virt-install works for rhel7 or fedora with 1 nic
|
# The default virt-install works for rhel7 or fedora with 1 nic
|
||||||
#
|
#
|
||||||
|
|
|
@ -29,7 +29,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 ( ansible_ifcfg_blacklist not defined )
|
when: ansible_distribution_major_version|int >=7 and nmclitest|success and ( not ansible_ifcfg_blacklist )
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- resolvconf
|
- resolvconf
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: 'if_uuid.stdout == ""'
|
failed_when: 'if_uuid.stdout == ""'
|
||||||
always_run: yes
|
always_run: yes
|
||||||
when: ansible_distribution_major_version|int >=7 and nmclitest|success and ( ansible_ifcfg_blacklist not defined )
|
when: ansible_distribution_major_version|int >=7 and nmclitest|success and ( not ansible_ifcfg_blacklist )
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- ifcfg
|
- ifcfg
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
# - restart NetworkManager
|
# - restart NetworkManager
|
||||||
- reload NetworkManager-connections
|
- reload NetworkManager-connections
|
||||||
- apply interface-changes
|
- apply interface-changes
|
||||||
when: (virthost is not defined) and (not item.startswith('tun')) and (not item.startswith('virbr')) and (hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['type'] == 'ether') and (ansible_distribution_major_version|int >=7) and hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['active'] and nmclitest|success and ( ansible_ifcfg_blacklist not defined )
|
when: (virthost is not defined) and (not item.startswith('tun')) and (not item.startswith('virbr')) and (hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['type'] == 'ether') and (ansible_distribution_major_version|int >=7) and hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['active'] and nmclitest|success and ( not ansible_ifcfg_blacklist )
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- ifcfg
|
- ifcfg
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue