From 5cc354696d174ade24cf78021dcf9df1c03418a6 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 29 Jan 2014 12:29:26 -0600 Subject: [PATCH] Build variable dictionary on included plays without using dict() Using dict(k=v) means the key was always named 'k', as the variable is not interpreted there. Fixes #5801 --- lib/ansible/playbook/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/playbook/__init__.py b/lib/ansible/playbook/__init__.py index 28b58967d5..61db0512fe 100644 --- a/lib/ansible/playbook/__init__.py +++ b/lib/ansible/playbook/__init__.py @@ -209,7 +209,7 @@ class PlayBook(object): p['vars'].update(incvars) elif isinstance(p['vars'], list): # nobody should really do this, but handle vars: a=1 b=2 - p['vars'].extend([dict(k=v) for k,v in incvars.iteritems()]) + p['vars'].extend([{k:v} for k,v in incvars.iteritems()]) accumulated_plays.extend(plays) play_basedirs.extend(basedirs)