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

Pop tags out of playbook include params

Fixes #12605
This commit is contained in:
James Cammarata 2015-10-05 08:40:57 -04:00
parent 10a4a4e986
commit 323012be2e

View file

@ -78,6 +78,9 @@ class PlaybookInclude(Base, Conditional, Taggable):
for entry in pb._entries: for entry in pb._entries:
temp_vars = entry.vars.copy() temp_vars = entry.vars.copy()
temp_vars.update(new_obj.vars) temp_vars.update(new_obj.vars)
param_tags = temp_vars.pop('tags', None)
if param_tags is not None:
entry.tags.extend(param_tags.split(','))
entry.vars = temp_vars entry.vars = temp_vars
entry.tags = list(set(entry.tags).union(new_obj.tags)) entry.tags = list(set(entry.tags).union(new_obj.tags))
if entry._included_path is None: if entry._included_path is None: