From 84908a57fce3e6c1919ab7b85839f40d7f7d9585 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 17 Mar 2014 23:00:50 -0500 Subject: [PATCH] Don't filter role deps on tags Also, fixed a bug where the tags were being merged into the wrong data structure (passed_vars) in _build_role_dependencies() Fixes #6439 Fixes #5709 --- lib/ansible/playbook/play.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index fc5b4997f01..5d2f9e0a731 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -229,11 +229,11 @@ class Play(object): allow_dupes = utils.boolean(meta_data.get('allow_duplicates','')) # if any tags were specified as role/dep variables, merge - # them into the passed_vars so they're passed on to any + # them into the current dep_vars so they're passed on to any # further dependencies too, and so we only have one place - # (passed_vars) to look for tags going forward + # (dep_vars) to look for tags going forward def __merge_tags(var_obj): - old_tags = passed_vars.get('tags', []) + old_tags = dep_vars.get('tags', []) if isinstance(var_obj, dict): new_tags = var_obj.get('tags', []) if isinstance(new_tags, basestring): @@ -242,16 +242,8 @@ class Play(object): new_tags = [] return list(set(old_tags).union(set(new_tags))) - if "tags" in passed_vars: - dep_tags = __merge_tags(dep) - if not self._is_valid_tag(dep_tags): - # one of the tags specified for this role was in the - # skip list, or we're limiting the tags and it didn't - # match one, so we just skip it completely - continue - - passed_vars['tags'] = __merge_tags(role_vars) - passed_vars['tags'] = __merge_tags(dep_vars) + dep_vars['tags'] = __merge_tags(role_vars) + dep_vars['tags'] = __merge_tags(passed_vars) # if tags are set from this role, merge them # into the tags list for the dependent role