From 72524e1f3bbb6f86a691c8c4712e0f887edd65cb Mon Sep 17 00:00:00 2001 From: Isao Jonas Date: Tue, 27 May 2014 18:38:03 -0500 Subject: [PATCH] dont mutate inventory vars --- lib/ansible/runner/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 9526ecb2d72..e3d69d10398 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -92,7 +92,7 @@ class HostVars(dict): def __getitem__(self, host): if host not in self.lookup: - result = self.inventory.get_variables(host, vault_password=self.vault_password) + result = self.inventory.get_variables(host, vault_password=self.vault_password).copy() result.update(self.vars_cache.get(host, {})) self.lookup[host] = result return self.lookup[host]