From a498876bece35ca594de24e0c7891be7a8351351 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 12 Aug 2015 23:38:20 -0400 Subject: [PATCH] Make sure playbook includes use unique var dictionaries before modification --- lib/ansible/playbook/playbook_include.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/playbook/playbook_include.py b/lib/ansible/playbook/playbook_include.py index 5e83f0d3a3..777f81c515 100644 --- a/lib/ansible/playbook/playbook_include.py +++ b/lib/ansible/playbook/playbook_include.py @@ -74,7 +74,9 @@ class PlaybookInclude(Base, Conditional, Taggable): # finally, update each loaded playbook entry with any variables specified # on the included playbook and/or any tags which may have been set for entry in pb._entries: - entry.vars.update(new_obj.vars) + temp_vars = entry.vars.copy() + temp_vars.update(new_obj.vars) + entry.vars = temp_vars entry.tags = list(set(entry.tags).union(new_obj.tags)) return pb