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
04635333
Commit
04635333
authored
Jan 07, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update fact gathering for solaris-family distributions
parent
05881623
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletions
+19
-1
lib/ansible/module_utils/facts.py
+19
-1
No files found.
lib/ansible/module_utils/facts.py
View file @
04635333
...
...
@@ -82,7 +82,8 @@ class Facts(object):
subclass Facts.
"""
_I386RE
=
re
.
compile
(
r'i[3456]86'
)
# i86pc is a Solaris and derivatives-ism
_I386RE
=
re
.
compile
(
r'i([3456]86|86pc)'
)
# For the most part, we assume that platform.dist() will tell the truth.
# This is the fallback to handle unknowns or exceptions
OSDIST_LIST
=
(
(
'/etc/redhat-release'
,
'RedHat'
),
...
...
@@ -320,6 +321,23 @@ class Facts(object):
self
.
facts
[
'distribution_version'
]
=
data
.
split
()[
1
]
self
.
facts
[
'distribution_release'
]
=
ora_prefix
+
data
break
uname_rc
,
uname_out
,
uname_err
=
module
.
run_command
([
'uname'
,
'-v'
])
if
'SmartOS'
in
data
:
self
.
facts
[
'distribution'
]
=
'SmartOS'
elif
'OpenIndiana'
in
data
:
self
.
facts
[
'distribution'
]
=
'OpenIndiana'
elif
'OmniOS'
in
data
:
self
.
facts
[
'distribution'
]
=
'OmniOS'
elif
uname_rc
==
0
and
'NexentaOS_'
in
uname_out
:
self
.
facts
[
'distribution'
]
=
'NexentaStor'
if
self
.
fact
[
'distribution'
]
in
(
'SmartOS'
,
'OpenIndiana'
,
'OmniOS'
,
'NexentaStor'
):
self
.
facts
[
'distribution_release'
]
=
data
.
strip
()
if
uname_rc
==
0
:
self
.
facts
[
'distribution_version'
]
=
uname_out
.
split
(
'
\n
'
)[
0
]
.
strip
()
break
elif
name
==
'SuSE'
:
data
=
get_file_content
(
path
)
if
'suse'
in
data
.
lower
():
...
...
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