mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
Check for skipped tags in passed role variables before adding to them
Fixes #6330
This commit is contained in:
parent
c79b5ea4b4
commit
04a6dc6d12
1 changed files with 7 additions and 7 deletions
|
@ -227,6 +227,13 @@ class Play(object):
|
||||||
if meta_data:
|
if meta_data:
|
||||||
allow_dupes = utils.boolean(meta_data.get('allow_duplicates',''))
|
allow_dupes = utils.boolean(meta_data.get('allow_duplicates',''))
|
||||||
|
|
||||||
|
if "tags" in passed_vars:
|
||||||
|
if not self._is_valid_tag(passed_vars["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
|
||||||
|
|
||||||
# if any tags were specified as role/dep variables, merge
|
# 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 passed_vars so they're passed on to any
|
||||||
# further dependencies too, and so we only have one place
|
# further dependencies too, and so we only have one place
|
||||||
|
@ -268,13 +275,6 @@ class Play(object):
|
||||||
if 'role' in dep_vars:
|
if 'role' in dep_vars:
|
||||||
del dep_vars['role']
|
del dep_vars['role']
|
||||||
|
|
||||||
if "tags" in passed_vars:
|
|
||||||
if not self._is_valid_tag(passed_vars["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
|
|
||||||
|
|
||||||
if not allow_dupes:
|
if not allow_dupes:
|
||||||
if dep in self.included_roles:
|
if dep in self.included_roles:
|
||||||
# skip back to the top, since we don't want to
|
# skip back to the top, since we don't want to
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue