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
b82a8576
Commit
b82a8576
authored
Feb 19, 2015
by
Dagobert Michelsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for mounts in Solaris facts
parent
67fb3945
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
lib/ansible/module_utils/facts.py
+15
-0
No files found.
lib/ansible/module_utils/facts.py
View file @
b82a8576
...
...
@@ -971,6 +971,10 @@ class SunOSHardware(Hardware):
def
populate
(
self
):
self
.
get_cpu_facts
()
self
.
get_memory_facts
()
try
:
self
.
get_mount_facts
()
except
TimeoutError
:
pass
return
self
.
facts
def
get_cpu_facts
(
self
):
...
...
@@ -1031,6 +1035,17 @@ class SunOSHardware(Hardware):
self
.
facts
[
'swap_allocated_mb'
]
=
allocated
/
1024
self
.
facts
[
'swap_reserved_mb'
]
=
reserved
/
1024
@timeout
(
10
)
def
get_mount_facts
(
self
):
self
.
facts
[
'mounts'
]
=
[]
# For a detailed format description see mnttab(4)
# special mount_point fstype options time
fstab
=
get_file_content
(
'/etc/mnttab'
)
if
fstab
:
for
line
in
fstab
.
split
(
'
\n
'
):
fields
=
line
.
rstrip
(
'
\n
'
)
.
split
(
'
\t
'
)
self
.
facts
[
'mounts'
]
.
append
({
'mount'
:
fields
[
1
],
'device'
:
fields
[
0
],
'fstype'
:
fields
[
2
],
'options'
:
fields
[
3
],
'time'
:
fields
[
4
]})
class
OpenBSDHardware
(
Hardware
):
"""
OpenBSD-specific subclass of Hardware. Defines memory, CPU and device facts:
...
...
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