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
15ad0210
Commit
15ad0210
authored
Jul 02, 2015
by
verm666
Committed by
Brian Coca
Jul 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
facts: add aliases to ansible_all_ipv4_addresses on OpenBSD
parent
5e78c5c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
lib/ansible/module_utils/facts.py
+8
-4
No files found.
lib/ansible/module_utils/facts.py
View file @
15ad0210
...
...
@@ -1975,7 +1975,7 @@ class GenericBsdIfconfigNetwork(Network):
return
interface
[
'v4'
],
interface
[
'v6'
]
def
get_interfaces_info
(
self
,
ifconfig_path
):
def
get_interfaces_info
(
self
,
ifconfig_path
,
ifconfig_options
=
'-a'
):
interfaces
=
{}
current_if
=
{}
ips
=
dict
(
...
...
@@ -1985,7 +1985,7 @@ class GenericBsdIfconfigNetwork(Network):
# FreeBSD, DragonflyBSD, NetBSD, OpenBSD and OS X all implicitly add '-a'
# when running the command 'ifconfig'.
# Solaris must explicitly run the command 'ifconfig -a'.
rc
,
out
,
err
=
module
.
run_command
([
ifconfig_path
,
'-a'
])
rc
,
out
,
err
=
module
.
run_command
([
ifconfig_path
,
ifconfig_options
])
for
line
in
out
.
split
(
'
\n
'
):
...
...
@@ -2155,14 +2155,14 @@ class AIXNetwork(GenericBsdIfconfigNetwork, Network):
platform
=
'AIX'
# AIX 'ifconfig -a' does not have three words in the interface line
def
get_interfaces_info
(
self
,
ifconfig_path
):
def
get_interfaces_info
(
self
,
ifconfig_path
,
ifconfig_options
):
interfaces
=
{}
current_if
=
{}
ips
=
dict
(
all_ipv4_addresses
=
[],
all_ipv6_addresses
=
[],
)
rc
,
out
,
err
=
module
.
run_command
([
ifconfig_path
,
'-a'
])
rc
,
out
,
err
=
module
.
run_command
([
ifconfig_path
,
ifconfig_options
])
for
line
in
out
.
split
(
'
\n
'
):
...
...
@@ -2242,6 +2242,10 @@ class OpenBSDNetwork(GenericBsdIfconfigNetwork, Network):
"""
platform
=
'OpenBSD'
# OpenBSD 'ifconfig -a' does not have information about aliases
def
get_interfaces_info
(
self
,
ifconfig_path
,
ifconfig_options
=
'-aA'
):
return
super
(
OpenBSDNetwork
,
self
)
.
get_interfaces_info
(
ifconfig_path
,
ifconfig_options
)
# Return macaddress instead of lladdr
def
parse_lladdr_line
(
self
,
words
,
current_if
,
ips
):
current_if
[
'macaddress'
]
=
words
[
1
]
...
...
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