mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
V2 fixes
* PluginLoader class will now be more selective about loading some plugin classes, if a required base class is specified (used to avoid loading v1 plugins that have changed significantly in their apis) * Added ability for the connection info class to read values from a given hosts variables, to support "magic" variables * Added some more magic variables to the VariableManager output * Fixed a bug in the ActionBase class, where the module configuration code was not correctly handling unicode
This commit is contained in:
parent
f141ec9671
commit
daf533c80e
5 changed files with 75 additions and 36 deletions
|
@ -212,9 +212,13 @@ class VariableManager:
|
|||
# FIXME: make sure all special vars are here
|
||||
# Finally, we create special vars
|
||||
|
||||
if host and self._inventory is not None:
|
||||
hostvars = HostVars(vars_manager=self, inventory=self._inventory, loader=loader)
|
||||
all_vars['hostvars'] = hostvars
|
||||
|
||||
if host:
|
||||
all_vars['groups'] = [group.name for group in host.get_groups()]
|
||||
|
||||
if self._inventory is not None:
|
||||
hostvars = HostVars(vars_manager=self, inventory=self._inventory, loader=loader)
|
||||
all_vars['hostvars'] = hostvars
|
||||
|
||||
if self._inventory is not None:
|
||||
all_vars['inventory_dir'] = self._inventory.basedir()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue