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
635bea64
Commit
635bea64
authored
Jul 24, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7992 from dehylton/devel
fix swap translation on 4.x openbsd with 2.5.4 python
parents
2e2a1d4b
379e1a49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
lib/ansible/module_utils/facts.py
+5
-2
No files found.
lib/ansible/module_utils/facts.py
View file @
635bea64
...
...
@@ -31,6 +31,8 @@ import getpass
import
ConfigParser
import
StringIO
from
string
import
maketrans
try
:
import
selinux
HAVE_SELINUX
=
True
...
...
@@ -910,9 +912,10 @@ class OpenBSDHardware(Hardware):
# total: 69268k bytes allocated = 0k used, 69268k available
rc
,
out
,
err
=
module
.
run_command
(
"/sbin/swapctl -sk"
)
if
rc
==
0
:
swaptrans
=
maketrans
(
' '
,
' '
)
data
=
out
.
split
()
self
.
facts
[
'swapfree_mb'
]
=
long
(
data
[
-
2
]
.
translate
(
None
,
"kmg"
))
/
1024
self
.
facts
[
'swaptotal_mb'
]
=
long
(
data
[
1
]
.
translate
(
None
,
"kmg"
))
/
1024
self
.
facts
[
'swapfree_mb'
]
=
long
(
data
[
-
2
]
.
translate
(
swaptrans
,
"kmg"
))
/
1024
self
.
facts
[
'swaptotal_mb'
]
=
long
(
data
[
1
]
.
translate
(
swaptrans
,
"kmg"
))
/
1024
def
get_processor_facts
(
self
):
processor
=
[]
...
...
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