mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 21:30:22 -07:00
Merge pull request #10183 from bcoca/tag_control
adds complex tag management
This commit is contained in:
commit
c81d981164
7 changed files with 138 additions and 67 deletions
|
@ -129,7 +129,7 @@ class Task(object):
|
|||
|
||||
# load various attributes
|
||||
self.name = ds.get('name', None)
|
||||
self.tags = [ 'all' ]
|
||||
self.tags = [ 'untagged' ]
|
||||
self.register = ds.get('register', None)
|
||||
self.sudo = utils.boolean(ds.get('sudo', play.sudo))
|
||||
self.su = utils.boolean(ds.get('su', play.su))
|
||||
|
@ -316,6 +316,9 @@ class Task(object):
|
|||
self.tags.extend(apply_tags)
|
||||
self.tags.extend(import_tags)
|
||||
|
||||
if len(self.tags) > 1:
|
||||
self.tags.remove('untagged')
|
||||
|
||||
if additional_conditions:
|
||||
new_conditions = additional_conditions[:]
|
||||
if self.when:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue