mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
facts: correctly detect multiple ipv6 addresses per device (#50020)
Fixes #49473
This commit is contained in:
parent
6b41588e93
commit
29c3bb48e9
2 changed files with 7 additions and 5 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- Correctly detect multiple ipv6 addresses per device in facts (https://github.com/ansible/ansible/issues/49473)
|
|
@ -237,11 +237,11 @@ class LinuxNetwork(Network):
|
|||
scope = words[3]
|
||||
if 'ipv6' not in interfaces[device]:
|
||||
interfaces[device]['ipv6'] = []
|
||||
interfaces[device]['ipv6'].append({
|
||||
'address': address,
|
||||
'prefix': prefix,
|
||||
'scope': scope
|
||||
})
|
||||
interfaces[device]['ipv6'].append({
|
||||
'address': address,
|
||||
'prefix': prefix,
|
||||
'scope': scope
|
||||
})
|
||||
# If this is the default address, update default_ipv6
|
||||
if 'address' in default_ipv6 and default_ipv6['address'] == address:
|
||||
default_ipv6['prefix'] = prefix
|
||||
|
|
Loading…
Reference in a new issue