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
0741ca3d
Commit
0741ca3d
authored
May 29, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3055 from kubicek/freebsd
Add some FreeBSD facts
parents
31631096
5cb05254
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
CHANGELOG.md
+1
-1
library/system/setup
+14
-1
No files found.
CHANGELOG.md
View file @
0741ca3d
...
...
@@ -122,7 +122,7 @@ the variable is still registered for the host, with the attribute skipped: True.
*
pip works better when sudoing from unpriveledged users
*
fix for user creation with groups specification reporting 'changed' incorrectly in some cases
*
fix for some unicode encoding errors in outputing some data in verbose mode
*
improved NetBSD and Solaris facts
*
improved
FreeBSD,
NetBSD and Solaris facts
*
debug module always outputs data without having to specify -v
1.
1 "Mean Street" -- 4/2/2013
...
...
library/system/setup
View file @
0741ca3d
...
...
@@ -121,6 +121,7 @@ class Facts(object):
{
'path'
:
'/opt/local/bin/pkgin'
,
'name'
:
'pkgin'
},
{
'path'
:
'/opt/local/bin/port'
,
'name'
:
'macports'
},
{
'path'
:
'/sbin/apk'
,
'name'
:
'apk'
},
{
'path'
:
'/usr/sbin/pkg'
,
'name'
:
'pkgng'
},
]
def
__init__
(
self
):
...
...
@@ -175,7 +176,8 @@ class Facts(object):
SLED
=
'Suse'
,
OpenSuSE
=
'Suse'
,
SuSE
=
'Suse'
,
Gentoo
=
'Gentoo'
,
Archlinux
=
'Archlinux'
,
Mandriva
=
'Mandrake'
,
Mandrake
=
'Mandrake'
,
Solaris
=
'Solaris'
,
Nexenta
=
'Solaris'
,
OmniOS
=
'Solaris'
,
OpenIndiana
=
'Solaris'
,
SmartOS
=
'Solaris'
,
AIX
=
'AIX'
,
Alpine
=
'Alpine'
,
MacOSX
=
'Darwin'
SmartOS
=
'Solaris'
,
AIX
=
'AIX'
,
Alpine
=
'Alpine'
,
MacOSX
=
'Darwin'
,
FreeBSD
=
'FreeBSD'
)
if
self
.
facts
[
'system'
]
==
'AIX'
:
...
...
@@ -189,6 +191,10 @@ class Facts(object):
rc
,
out
,
err
=
module
.
run_command
(
"/usr/bin/sw_vers -productVersion"
)
data
=
out
.
split
()[
-
1
]
self
.
facts
[
'distribution_version'
]
=
data
elif
self
.
facts
[
'system'
]
==
'FreeBSD'
:
self
.
facts
[
'distribution'
]
=
'FreeBSD'
self
.
facts
[
'distribution_release'
]
=
platform
.
release
()
self
.
facts
[
'distribution_version'
]
=
platform
.
version
()
else
:
dist
=
platform
.
dist
()
self
.
facts
[
'distribution'
]
=
dist
[
0
]
.
capitalize
()
or
'NA'
...
...
@@ -245,12 +251,15 @@ class Facts(object):
def
get_public_ssh_host_keys
(
self
):
dsa_filename
=
'/etc/ssh/ssh_host_dsa_key.pub'
rsa_filename
=
'/etc/ssh/ssh_host_rsa_key.pub'
ecdsa_filename
=
'/etc/ssh/ssh_host_ecdsa_key.pub'
if
self
.
facts
[
'system'
]
==
'Darwin'
:
dsa_filename
=
'/etc/ssh_host_dsa_key.pub'
rsa_filename
=
'/etc/ssh_host_rsa_key.pub'
ecdsa_filename
=
'/etc/ssh_host_ecdsa_key.pub'
dsa
=
get_file_content
(
dsa_filename
)
rsa
=
get_file_content
(
rsa_filename
)
ecdsa
=
get_file_content
(
ecdsa_filename
)
if
dsa
is
None
:
dsa
=
'NA'
else
:
...
...
@@ -259,6 +268,10 @@ class Facts(object):
rsa
=
'NA'
else
:
self
.
facts
[
'ssh_host_key_rsa_public'
]
=
rsa
.
split
()[
1
]
if
ecdsa
is
None
:
ecdsa
=
'NA'
else
:
self
.
facts
[
'ssh_host_key_ecdsa_public'
]
=
ecdsa
.
split
()[
1
]
def
get_pkg_mgr_facts
(
self
):
self
.
facts
[
'pkg_mgr'
]
=
'unknown'
...
...
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