Allow interfaces to be marked as explicitly disabled
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
3f284aed9e
commit
4d7f15164c
2 changed files with 6 additions and 0 deletions
|
@ -60,6 +60,8 @@ br0_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
|
||||
# List of interfaces to explicitly disable
|
||||
ansible_ifcfg_disabled: []
|
||||
#
|
||||
# The default virt-install works for rhel7 or fedora with 1 nic
|
||||
#
|
||||
|
|
|
@ -13,8 +13,12 @@ DNS1="{{ dns1 }}"
|
|||
DNS2="{{ dns2 }}"
|
||||
{% endif %}
|
||||
HWADDR="{{ hostvars[inventory_hostname]['ansible_' + item]['macaddress']|upper }}"
|
||||
{% if item in ansible_ifcfg_disabled %}
|
||||
ONBOOT="no"
|
||||
{% else %}
|
||||
IPADDR="{{ hostvars[inventory_hostname][item + '_ip'] }}"
|
||||
NETMASK="{{ hostvars[inventory_hostname][item + '_nm'] }}"
|
||||
{% endif %}
|
||||
ONBOOT="yes"
|
||||
TYPE="Ethernet"
|
||||
DEVICE="{{item}}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue