Merge "Fix interfaces in boot_param_tasks"
This commit is contained in:
commit
75512d3362
|
@ -72,10 +72,10 @@
|
|||
when:
|
||||
- item.path | regex_replace('(^.*ifcfg-)(.*)', '\\2') != "lo"
|
||||
# Ensure the interface information is available in the facts
|
||||
- hostvars[inventory_hostname]['ansible_' + item.path | regex_replace('(^.*ifcfg-)(.*)', '\\2') ] is defined
|
||||
- hostvars[inventory_hostname]['ansible_' + item.path | regex_replace('(^.*ifcfg-)(.*)', '\\2') | replace('-', '_') ] is defined
|
||||
# This condition will list all the interfaces except the one with valid IP (which is Provisioning network at this stage)
|
||||
# Simpler Version - hostvars[inventory_hostname]['ansible_' + iface_name ]['ipv4'] is undefined
|
||||
- hostvars[inventory_hostname]['ansible_' + item.path | regex_replace('(^.*ifcfg-)(.*)', '\\2') ]['ipv4'] is undefined
|
||||
- hostvars[inventory_hostname]['ansible_' + item.path | regex_replace('(^.*ifcfg-)(.*)', '\\2') | replace('-', '_') ]['ipv4'] is undefined
|
||||
with_items:
|
||||
- "{{ ifcfg_files.files }}"
|
||||
become: true
|
||||
|
|
Loading…
Reference in New Issue