Make sure tags are pulled out of playbook includes properly

Fixes #9862
This commit is contained in:
James Cammarata 2015-06-30 16:08:46 -04:00
parent 54e7c8a3f7
commit 7c1d569a26

View file

@ -118,6 +118,8 @@ class PlaybookInclude(Base, Taggable):
# rejoin the parameter portion of the arguments and # rejoin the parameter portion of the arguments and
# then use parse_kv() to get a dict of params back # then use parse_kv() to get a dict of params back
params = parse_kv(" ".join(items[1:])) params = parse_kv(" ".join(items[1:]))
if 'tags' in params:
new_ds['tags'] = params.pop('tags')
if 'vars' in new_ds: if 'vars' in new_ds:
# FIXME: see fixme above regarding merging vars # FIXME: see fixme above regarding merging vars
raise AnsibleParserError("include parameters cannot be mixed with 'vars' entries for include statements", obj=ds) raise AnsibleParserError("include parameters cannot be mixed with 'vars' entries for include statements", obj=ds)