mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
no uses get_bin_path for 2nd use of ip tool (fixes reported issue with openwrt)
module needs this added to many tool invokations, but his is a start Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
This commit is contained in:
parent
c0f138db1f
commit
8d6e18fc90
1 changed files with 2 additions and 1 deletions
|
@ -1110,7 +1110,8 @@ class LinuxNetwork(Network):
|
||||||
path = os.path.join(path, 'bonding', 'all_slaves_active')
|
path = os.path.join(path, 'bonding', 'all_slaves_active')
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
interfaces[device]['all_slaves_active'] = open(path).read() == '1'
|
interfaces[device]['all_slaves_active'] = open(path).read() == '1'
|
||||||
output = subprocess.Popen(['/sbin/ip', 'addr', 'show', device], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
|
ip_path = module.get_bin_path("ip")
|
||||||
|
output = subprocess.Popen([ip_path, 'addr', 'show', device], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
|
||||||
for line in output.split('\n'):
|
for line in output.split('\n'):
|
||||||
|
|
||||||
if not line:
|
if not line:
|
||||||
|
|
Loading…
Reference in a new issue