Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
a59784a5
Commit
a59784a5
authored
Mar 10, 2015
by
Boris Manojlovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't use full path to command instead use module.get_bin_path
parent
0f4cf8cb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
lib/ansible/module_utils/facts.py
+9
-4
No files found.
lib/ansible/module_utils/facts.py
View file @
a59784a5
...
@@ -2179,13 +2179,16 @@ class AIXNetwork(GenericBsdIfconfigNetwork, Network):
...
@@ -2179,13 +2179,16 @@ class AIXNetwork(GenericBsdIfconfigNetwork, Network):
self
.
parse_inet6_line
(
words
,
current_if
,
ips
)
self
.
parse_inet6_line
(
words
,
current_if
,
ips
)
else
:
else
:
self
.
parse_unknown_line
(
words
,
current_if
,
ips
)
self
.
parse_unknown_line
(
words
,
current_if
,
ips
)
uname_path
=
module
.
get_bin_path
(
'uname'
)
rc
,
out
,
err
=
module
.
run_command
([
'/usr/bin/uname'
,
'-W'
])
if
uname_path
:
rc
,
out
,
err
=
module
.
run_command
([
uname_path
,
'-W'
])
# don't bother with wpars it does not work
# don't bother with wpars it does not work
# zero means not in wpar
# zero means not in wpar
if
out
.
split
()[
0
]
==
'0'
:
if
out
.
split
()[
0
]
==
'0'
:
if
current_if
[
'macaddress'
]
==
'unknown'
and
re
.
match
(
'^en'
,
current_if
[
'device'
]):
if
current_if
[
'macaddress'
]
==
'unknown'
and
re
.
match
(
'^en'
,
current_if
[
'device'
]):
rc
,
out
,
err
=
module
.
run_command
([
'/usr/bin/entstat'
,
current_if
[
'device'
]
])
entstat_path
=
module
.
get_bin_path
(
'entstat'
)
if
entstat_path
:
rc
,
out
,
err
=
module
.
run_command
([
entstat_path
,
current_if
[
'device'
]
])
if
rc
!=
0
:
if
rc
!=
0
:
break
break
for
line
in
out
.
split
(
'
\n
'
):
for
line
in
out
.
split
(
'
\n
'
):
...
@@ -2200,7 +2203,9 @@ class AIXNetwork(GenericBsdIfconfigNetwork, Network):
...
@@ -2200,7 +2203,9 @@ class AIXNetwork(GenericBsdIfconfigNetwork, Network):
current_if
[
'type'
]
=
'ether'
current_if
[
'type'
]
=
'ether'
# device must have mtu attribute in ODM
# device must have mtu attribute in ODM
if
'mtu'
not
in
current_if
:
if
'mtu'
not
in
current_if
:
rc
,
out
,
err
=
module
.
run_command
([
'/usr/sbin/lsattr'
,
'-El'
,
current_if
[
'device'
]
])
lsattr_path
=
module
.
get_bin_path
(
'lsattr'
)
if
lsattr_path
:
rc
,
out
,
err
=
module
.
run_command
([
lsattr_path
,
'-El'
,
current_if
[
'device'
]
])
if
rc
!=
0
:
if
rc
!=
0
:
break
break
for
line
in
out
.
split
(
'
\n
'
):
for
line
in
out
.
split
(
'
\n
'
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment