1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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
This commit is contained in:
James Cammarata 2014-01-29 12:29:26 -06:00
parent 48c477ffc8
commit 5cc354696d

View file

@ -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)