mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-06 10:43:14 +00:00
facts: Fix duplicate IPs in ipv4_secondaries (#32040)
This commit is contained in:
@@ -206,12 +206,13 @@ class LinuxNetwork(Network):
|
||||
if secondary:
|
||||
if "ipv4_secondaries" not in interfaces[device]:
|
||||
interfaces[device]["ipv4_secondaries"] = []
|
||||
interfaces[device]["ipv4_secondaries"].append({
|
||||
'address': address,
|
||||
'broadcast': broadcast,
|
||||
'netmask': netmask,
|
||||
'network': network,
|
||||
})
|
||||
if device != iface:
|
||||
interfaces[device]["ipv4_secondaries"].append({
|
||||
'address': address,
|
||||
'broadcast': broadcast,
|
||||
'netmask': netmask,
|
||||
'network': network,
|
||||
})
|
||||
|
||||
# NOTE: default_ipv4 is ref to outside scope
|
||||
# If this is the default address, update default_ipv4
|
||||
|
||||
Reference in New Issue
Block a user