mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-06 06:04:24 -07:00
Check for ipv6
This commit is contained in:
parent
96f257cea1
commit
eed031cd82
1 changed files with 2 additions and 0 deletions
|
@ -461,6 +461,8 @@ class LinuxNetwork(Network):
|
||||||
)
|
)
|
||||||
interface = dict(v4 = {}, v6 = {})
|
interface = dict(v4 = {}, v6 = {})
|
||||||
for v in 'v4', 'v6':
|
for v in 'v4', 'v6':
|
||||||
|
if v == 'v6' and not socket.has_ipv6:
|
||||||
|
continue
|
||||||
output = subprocess.Popen(command[v], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
|
output = subprocess.Popen(command[v], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
|
||||||
if not output:
|
if not output:
|
||||||
# v6 routing may result in
|
# v6 routing may result in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue