diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index f0826c3bdd..2ca710316a 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -337,6 +337,8 @@ class Runner(object): inject['hostvars'] = HostVars(self.setup_cache, self.inventory) inject['group_names'] = host_variables.get('group_names', []) inject['groups'] = self.inventory.groups_list() + inject['vars'] = self.module_vars + inject['environment'] = self.environment # allow with_foo to work in playbooks... items = None