mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Tweak invocation of ip in LinuxNetwork
Specify full path to ip and add third argument 'show' to be explicit about requested action. This goes from 'ip addr' to '/sbin/ip addr show'.
This commit is contained in:
parent
00c28e2810
commit
84028c2339
1 changed files with 1 additions and 1 deletions
|
@ -454,7 +454,7 @@ class LinuxNetwork(Network):
|
|||
ipv6_address = None
|
||||
)
|
||||
|
||||
output = subprocess.Popen(['ip','addr'], stdout=subprocess.PIPE).communicate()[0]
|
||||
output = subprocess.Popen(['/sbin/ip','addr', 'show'], stdout=subprocess.PIPE).communicate()[0]
|
||||
for line in output.split('\n'):
|
||||
if line:
|
||||
words = line.split()
|
||||
|
|
Loading…
Reference in a new issue