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
4614a574
Commit
4614a574
authored
Sep 30, 2014
by
Jonathan Süssemilch Poulain
Committed by
Jonathan Süssemilch Poulain
Jul 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allows network network interface facts collection as an unprivileged user and adds more facts
parent
e181bcf6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
lib/ansible/module_utils/facts.py
+20
-0
No files found.
lib/ansible/module_utils/facts.py
View file @
4614a574
...
@@ -2278,6 +2278,26 @@ class AIXNetwork(GenericBsdIfconfigNetwork, Network):
...
@@ -2278,6 +2278,26 @@ class AIXNetwork(GenericBsdIfconfigNetwork, Network):
"""
"""
platform
=
'AIX'
platform
=
'AIX'
def
get_default_interfaces
(
self
,
route_path
):
netstat_path
=
module
.
get_bin_path
(
'netstat'
)
rc
,
out
,
err
=
module
.
run_command
([
netstat_path
,
'-nr'
])
interface
=
dict
(
v4
=
{},
v6
=
{})
lines
=
out
.
split
(
'
\n
'
)
for
line
in
lines
:
words
=
line
.
split
()
if
len
(
words
)
>
1
and
words
[
0
]
==
'default'
:
if
'.'
in
words
[
1
]:
interface
[
'v4'
][
'gateway'
]
=
words
[
1
]
interface
[
'v4'
][
'interface'
]
=
words
[
5
]
elif
':'
in
words
[
1
]:
interface
[
'v6'
][
'gateway'
]
=
words
[
1
]
interface
[
'v6'
][
'interface'
]
=
words
[
5
]
return
interface
[
'v4'
],
interface
[
'v6'
]
# AIX 'ifconfig -a' does not have three words in the interface line
# AIX 'ifconfig -a' does not have three words in the interface line
def
get_interfaces_info
(
self
,
ifconfig_path
,
ifconfig_options
):
def
get_interfaces_info
(
self
,
ifconfig_path
,
ifconfig_options
):
interfaces
=
{}
interfaces
=
{}
...
...
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