mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Skip get_ipv6_facts if socket.has_ipv6 is false
This commit is contained in:
parent
b0eedfbf92
commit
2a0dfba838
1 changed files with 2 additions and 0 deletions
|
@ -482,6 +482,8 @@ class LinuxNetwork(Network):
|
|||
self.facts[iface]['ipv4']['network'] = socket.inet_ntoa(struct.pack("!L", ip & mask))
|
||||
|
||||
def get_ipv6_facts(self):
|
||||
if not socket.has_ipv6:
|
||||
return
|
||||
data = get_file_content('/proc/net/if_inet6')
|
||||
if data is None:
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue