From 323012be2eee2066953690804c6cc462bca1440f Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 5 Oct 2015 08:40:57 -0400 Subject: [PATCH] Pop tags out of playbook include params Fixes #12605 --- lib/ansible/playbook/playbook_include.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/playbook/playbook_include.py b/lib/ansible/playbook/playbook_include.py index 05a3dcb3a1d..df474378c56 100644 --- a/lib/ansible/playbook/playbook_include.py +++ b/lib/ansible/playbook/playbook_include.py @@ -78,6 +78,9 @@ class PlaybookInclude(Base, Conditional, Taggable): for entry in pb._entries: temp_vars = entry.vars.copy() 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.tags = list(set(entry.tags).union(new_obj.tags)) if entry._included_path is None: