-
Notifications
You must be signed in to change notification settings - Fork 682
Description
Summary
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_tags.html#adding-tags-to-includes is very clear about how the tags will affect it:
tags on an include_* task apply only to the include itself, not to any tasks within the included file or role
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_tags.html#adding-tags-to-plays says:
If all the tasks in a play should get the same tag, you can add the tag at the level of the play.
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_tags.html#adding-tags-to-roles says:
When you incorporate a role in your playbook statically with the roles keyword, Ansible adds any tags you define to all the tasks in the role.
In both of these cases it is not explicitly documented whether and how tagging will apply to the definition itself and/or it's downstream tasks.
Ideally, documentation would allow to clearly determine the following.
If a tag is included for a play or a role:
a) Is it run if no tags are specified?
b) Is the tag passed down to all the tasks?
Issue Type
Documentation Report
Component Name
tags
Ansible Version
$ ansible --version
Configuration
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
OS / Environment
Not relevant.
Additional Information
Users could unambiguously determine the behaviour just from reading the documentation.
Code of Conduct
- I agree to follow the Ansible Code of Conduct
Metadata
Metadata
Assignees
Labels
Type
Projects
Status