mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix type detection on OpenSolaris for loopback interface
Extract of ifconfig output: # ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 rtls0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 3 inet 192.168.125.125 netmask ffffff00 broadcast 192.168.125.255 ether 0:20:91:83:45:82
This commit is contained in:
parent
221cafe769
commit
d393409fed
1 changed files with 2 additions and 0 deletions
|
@ -3026,6 +3026,8 @@ class SunOSNetwork(GenericBsdIfconfigNetwork):
|
|||
v = 'ipv4'
|
||||
if 'IPv6' in flags:
|
||||
v = 'ipv6'
|
||||
if 'LOOPBACK' in flags:
|
||||
current_if['type'] = 'loopback'
|
||||
current_if[v].append({'flags': flags, 'mtu': words[3]})
|
||||
current_if['macaddress'] = 'unknown' # will be overwritten later
|
||||
return current_if
|
||||
|
|
Loading…
Reference in a new issue