mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-07-08 11:39:02 +00:00
Merge branch 'bcoca-env_facts' into devel
This commit is contained in:
commit
ca2950141b
2 changed files with 7 additions and 1 deletions
|
|
@ -147,6 +147,7 @@ class Facts(object):
|
|||
self.get_date_time_facts()
|
||||
self.get_user_facts()
|
||||
self.get_local_facts()
|
||||
self.get_env_facts()
|
||||
|
||||
def populate(self):
|
||||
return self.facts
|
||||
|
|
@ -457,6 +458,10 @@ class Facts(object):
|
|||
def get_user_facts(self):
|
||||
self.facts['user_id'] = getpass.getuser()
|
||||
|
||||
def get_env_facts(self):
|
||||
self.facts['env'] = {}
|
||||
for k,v in os.environ.iteritems():
|
||||
self.facts['env'][k] = v
|
||||
|
||||
class Hardware(Facts):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue