diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 63e4ed27411..79a167c5a00 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)