From dcca08b27bf496d7a00db0fe1f077278268ab1cd Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Fri, 20 Jul 2012 10:02:35 -0400 Subject: [PATCH] Don't let with_items erase 'hostvars' --- lib/ansible/runner/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 486d3cdd001..87017db26d5 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -528,10 +528,9 @@ class Runner(object): host_variables = self.inventory.get_variables(host) port = host_variables.get('ansible_ssh_port', self.remote_port) inject = self.setup_cache[host].copy() - inject['hostvars'] = self.setup_cache inject.update(host_variables) inject.update(self.module_vars) - + inject['hostvars'] = self.setup_cache items = self.module_vars.get('items', []) if isinstance(items, basestring) and items.startswith("$"):