mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 21:31:26 -07:00
facts: Fix duplicate IPs in ipv4_secondaries (#32040)
This commit is contained in:
parent
ae92426e72
commit
2f67d3a4f3
1 changed files with 7 additions and 6 deletions
|
@ -206,12 +206,13 @@ class LinuxNetwork(Network):
|
||||||
if secondary:
|
if secondary:
|
||||||
if "ipv4_secondaries" not in interfaces[device]:
|
if "ipv4_secondaries" not in interfaces[device]:
|
||||||
interfaces[device]["ipv4_secondaries"] = []
|
interfaces[device]["ipv4_secondaries"] = []
|
||||||
interfaces[device]["ipv4_secondaries"].append({
|
if device != iface:
|
||||||
'address': address,
|
interfaces[device]["ipv4_secondaries"].append({
|
||||||
'broadcast': broadcast,
|
'address': address,
|
||||||
'netmask': netmask,
|
'broadcast': broadcast,
|
||||||
'network': network,
|
'netmask': netmask,
|
||||||
})
|
'network': network,
|
||||||
|
})
|
||||||
|
|
||||||
# NOTE: default_ipv4 is ref to outside scope
|
# NOTE: default_ipv4 is ref to outside scope
|
||||||
# If this is the default address, update default_ipv4
|
# If this is the default address, update default_ipv4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue