mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #4592 from mscherer/fix_4586
setup module, replace ':' by '_' in interface name, fix #4586
This commit is contained in:
commit
75e0a1c6de
1 changed files with 9 additions and 1 deletions
|
@ -1515,7 +1515,15 @@ class LinuxNetwork(Network):
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
|
||||||
parse_ip_output(primary_data)
|
parse_ip_output(primary_data)
|
||||||
parse_ip_output(secondary_data, secondary=True)
|
parse_ip_output(secondary_data, secondary=True)
|
||||||
return interfaces, ips
|
|
||||||
|
# replace : by _ in interface name since they are hard to use in template
|
||||||
|
new_interfaces = {}
|
||||||
|
for i in interfaces:
|
||||||
|
if ':' in i:
|
||||||
|
new_interfaces[i.replace(':','_')] = interfaces[i]
|
||||||
|
else:
|
||||||
|
new_interfaces[i] = interfaces[i]
|
||||||
|
return new_interfaces, ips
|
||||||
|
|
||||||
class GenericBsdIfconfigNetwork(Network):
|
class GenericBsdIfconfigNetwork(Network):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue