Commit fd321355 by James Cammarata

Adding 'role_path' to VariableManager "magic" variables (v2)

parent 7b1c6fba
......@@ -212,7 +212,6 @@ class VariableManager:
# FIXME: make sure all special vars are here
# Finally, we create special vars
if host:
all_vars['groups'] = [group.name for group in host.get_groups()]
......@@ -220,6 +219,10 @@ class VariableManager:
hostvars = HostVars(vars_manager=self, inventory=self._inventory, loader=loader)
all_vars['hostvars'] = hostvars
if task:
if task._role:
all_vars['role_path'] = task._role._role_path
if self._inventory is not None:
all_vars['inventory_dir'] = self._inventory.basedir()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment