1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fixed skipped tags

This commit is contained in:
Brian Coca 2015-02-08 23:06:34 -05:00
parent 95fa770ba0
commit 6579c5ddf5

View file

@ -736,7 +736,6 @@ class PlayBook(object):
continue
# only run the task if the requested tags match or has 'always' tag
should_run = False
if 'always' in task.tags:
should_run = True
else:
@ -745,26 +744,31 @@ class PlayBook(object):
if 'all' in self.only_tags:
should_run = True
elif 'tagged' in self.only_tags:
else:
should_run = False
if 'tagged' in self.only_tags:
if task_set != u:
should_run = True
elif 'untagged' in self.only_tags:
if task_set == u:
should_run = True
else:
if len(set(task.tags).intersection(self.only_tags)) > 0:
if len(task_set.intersection(self.only_tags)) > 0:
should_run = True
# Check for tags that we need to skip
if 'tagged' in self.skip_tags:
if task_set == u:
if 'all' in self.skip_tags:
should_run = False
elif 'untagged' in self.only_tags:
else:
if 'tagged' in self.skip_tags:
if task_set != u:
should_run = False
elif 'untagged' in self.skip_tags:
if task_set == u:
should_run = False
else:
if should_run:
if len(set(task.tags).intersection(self.skip_tags)) > 0:
if len(task_set.intersection(self.skip_tags)) > 0:
should_run = False
if should_run: