* 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:
James Cammarata 2015-05-11 11:22:41 -05:00
commit daf533c80e
5 changed files with 75 additions and 36 deletions

View file

@ -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()