Merge pull request #6311 from bcoca/tag_sets_fix

tags lists are properly uniqued and joined now
This commit is contained in:
James Cammarata 2014-03-06 09:23:09 -06:00
commit d76f49a827

View file

@ -236,7 +236,7 @@ class Play(object):
new_tags = var_obj.get('tags', []) new_tags = var_obj.get('tags', [])
if isinstance(new_tags, basestring): if isinstance(new_tags, basestring):
new_tags = [new_tags, ] new_tags = [new_tags, ]
return list(set(old_tags + new_tags)) return list(set(old_tags).union(set(new_tags)))
passed_vars['tags'] = __merge_tags(role_vars) passed_vars['tags'] = __merge_tags(role_vars)
passed_vars['tags'] = __merge_tags(dep_vars) passed_vars['tags'] = __merge_tags(dep_vars)
@ -249,7 +249,7 @@ class Play(object):
included_dep_vars = included_role_dep[2] included_dep_vars = included_role_dep[2]
if included_dep_name == dep: if included_dep_name == dep:
if "tags" in included_dep_vars: if "tags" in included_dep_vars:
included_dep_vars["tags"] = list(set(included_dep_vars["tags"] + passed_vars["tags"])) included_dep_vars["tags"] = list(set(included_dep_vars["tags"]).union(set(passed_vars["tags"])))
else: else:
included_dep_vars["tags"] = passed_vars["tags"][:] included_dep_vars["tags"] = passed_vars["tags"][:]