Commit 7b1c6fba by James Cammarata

Fix playbook includes so tags are obeyed (v2)

parent daf533c8
......@@ -61,10 +61,11 @@ class PlaybookInclude(Base, Taggable):
pb._load_playbook_data(file_name=file_name, variable_manager=variable_manager)
# finally, playbook includes can specify a list of variables, which are simply
# used to update the vars of each play in the playbook
# 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)
entry.tags = list(set(entry.tags).union(new_obj.tags))
return pb
......
- hosts: localhost
gather_facts: no
tags:
- included
tasks:
- debug: msg="incuded playbook, variable is {{a}}"
- include: included_playbook.yml a=1
tags: include
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment