diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 63e4ed2741..79a167c5a0 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -678,6 +678,7 @@ class Runner(object): temp_vars = utils.merge_hash(temp_vars, self.play_vars) temp_vars = utils.merge_hash(temp_vars, self.play_file_vars) temp_vars = utils.merge_hash(temp_vars, self.extra_vars) + temp_vars = utils.merge_hash(temp_vars, {'groups': inject['groups']}) hostvars = HostVars(temp_vars, self.inventory, vault_password=self.vault_pass)