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
7c772c6a
Commit
7c772c6a
authored
Feb 28, 2013
by
Josh Mandel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add remote user_id to ansible facts
parent
b5ad1ce7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
library/setup
+7
-0
No files found.
library/setup
View file @
7c772c6a
...
...
@@ -27,6 +27,7 @@ import re
import
socket
import
struct
import
datetime
import
getpass
DOCUMENTATION
=
'''
---
...
...
@@ -119,6 +120,7 @@ class Facts(object):
self
.
get_pkg_mgr_facts
()
self
.
get_lsb_facts
()
self
.
get_date_time_facts
()
self
.
get_user_facts
()
def
populate
(
self
):
return
self
.
facts
...
...
@@ -307,6 +309,11 @@ class Facts(object):
self
.
facts
[
'date_time'
][
'time'
]
=
now
.
strftime
(
'
%
H:
%
M:
%
S'
)
# User
def
get_user_facts
(
self
):
self
.
facts
[
'user_id'
]
=
getpass
.
getuser
()
class
Hardware
(
Facts
):
"""
This is a generic Hardware subclass of Facts. This should be further
...
...
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