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
3d8bb6c2
Commit
3d8bb6c2
authored
Mar 17, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'alpine' of
git://github.com/fabaff/ansible
into devel
Conflicts: library/setup
parents
ba51fc12
a5e4947d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
library/setup
+10
-3
No files found.
library/setup
View file @
3d8bb6c2
...
@@ -99,7 +99,8 @@ class Facts(object):
...
@@ -99,7 +99,8 @@ class Facts(object):
OSDIST_DICT
=
{
'/etc/redhat-release'
:
'RedHat'
,
OSDIST_DICT
=
{
'/etc/redhat-release'
:
'RedHat'
,
'/etc/vmware-release'
:
'VMwareESX'
,
'/etc/vmware-release'
:
'VMwareESX'
,
'/etc/openwrt_release'
:
'OpenWrt'
,
'/etc/openwrt_release'
:
'OpenWrt'
,
'/etc/system-release'
:
'OtherLinux'
}
'/etc/system-release'
:
'OtherLinux'
,
'/etc/alpine-release'
:
'Alpine'
}
SELINUX_MODE_DICT
=
{
1
:
'enforcing'
,
0
:
'permissive'
,
-
1
:
'disabled'
}
SELINUX_MODE_DICT
=
{
1
:
'enforcing'
,
0
:
'permissive'
,
-
1
:
'disabled'
}
# A list of dicts. If there is a platform with more than one
# A list of dicts. If there is a platform with more than one
...
@@ -111,7 +112,9 @@ class Facts(object):
...
@@ -111,7 +112,9 @@ class Facts(object):
{
'path'
:
'/usr/bin/pacman'
,
'name'
:
'pacman'
},
{
'path'
:
'/usr/bin/pacman'
,
'name'
:
'pacman'
},
{
'path'
:
'/bin/opkg'
,
'name'
:
'opkg'
},
{
'path'
:
'/bin/opkg'
,
'name'
:
'opkg'
},
{
'path'
:
'/opt/local/bin/pkgin'
,
'name'
:
'pkgin'
},
{
'path'
:
'/opt/local/bin/pkgin'
,
'name'
:
'pkgin'
},
{
'path'
:
'/opt/local/bin/port'
,
'name'
:
'macports'
}
]
{
'path'
:
'/opt/local/bin/port'
,
'name'
:
'macports'
},
{
'path'
:
'/sbin/apk'
,
'name'
:
'apk'
},
]
def
__init__
(
self
):
def
__init__
(
self
):
self
.
facts
=
{}
self
.
facts
=
{}
...
@@ -165,7 +168,7 @@ class Facts(object):
...
@@ -165,7 +168,7 @@ class Facts(object):
SLED
=
'Suse'
,
OpenSuSE
=
'Suse'
,
SuSE
=
'Suse'
,
Gentoo
=
'Gentoo'
,
SLED
=
'Suse'
,
OpenSuSE
=
'Suse'
,
SuSE
=
'Suse'
,
Gentoo
=
'Gentoo'
,
Archlinux
=
'Archlinux'
,
Mandriva
=
'Mandrake'
,
Mandrake
=
'Mandrake'
,
Archlinux
=
'Archlinux'
,
Mandriva
=
'Mandrake'
,
Mandrake
=
'Mandrake'
,
Solaris
=
'Solaris'
,
Nexenta
=
'Solaris'
,
OmniOS
=
'Solaris'
,
OpenIndiana
=
'Solaris'
,
Solaris
=
'Solaris'
,
Nexenta
=
'Solaris'
,
OmniOS
=
'Solaris'
,
OpenIndiana
=
'Solaris'
,
SmartOS
=
'Solaris'
,
AIX
=
'AIX'
,
MacOSX
=
'Darwin'
SmartOS
=
'Solaris'
,
AIX
=
'AIX'
,
Alpine
=
'Alpine'
,
MacOSX
=
'Darwin'
)
)
if
self
.
facts
[
'system'
]
==
'AIX'
:
if
self
.
facts
[
'system'
]
==
'AIX'
:
...
@@ -210,6 +213,10 @@ class Facts(object):
...
@@ -210,6 +213,10 @@ class Facts(object):
release
=
re
.
search
(
'DISTRIB_CODENAME="(.*)"'
,
data
)
release
=
re
.
search
(
'DISTRIB_CODENAME="(.*)"'
,
data
)
if
release
:
if
release
:
self
.
facts
[
'distribution_release'
]
=
release
.
groups
()[
0
]
self
.
facts
[
'distribution_release'
]
=
release
.
groups
()[
0
]
elif
name
==
'Alpine'
:
data
=
get_file_content
(
path
)
self
.
facts
[
'distribution'
]
=
'Alpine'
self
.
facts
[
'distribution_version'
]
=
data
else
:
else
:
self
.
facts
[
'distribution'
]
=
name
self
.
facts
[
'distribution'
]
=
name
...
...
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