mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge branch 'bcoca-env_facts' into devel
This commit is contained in:
commit
ca2950141b
2 changed files with 7 additions and 1 deletions
|
@ -18,7 +18,8 @@ New modules:
|
|||
|
||||
Misc changes:
|
||||
|
||||
* Added `state=touch` to the file module, which functions similarly to the command-line version of `touch`
|
||||
* Added `ansible_env` to the list of facts returned by the setup module.
|
||||
* Added `state=touch` to the file module, which functions similarly to the command-line version of `touch`.
|
||||
* Added a -vvvv level, which will show SSH client debugging information in the event of a failure.
|
||||
* Includes now support the more standard syntax, similar to that of role includes and dependencies. It is no longer necessary to specify a special "vas" field for the variables passed to the include.
|
||||
* Changed the `user:` parameter on plays to `remote_user:` to prevent confusion with the module of the same name. Still backwards compatible on play parameters.
|
||||
|
|
|
@ -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…
Reference in a new issue