-
Notifications
You must be signed in to change notification settings - Fork 23.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix roles language in docs #25811
Fix roles language in docs #25811
Conversation
name: foo | ||
tags: | ||
- bar | ||
- baz | ||
|
||
.. note:: | ||
This *tags all of the tasks in that role with the tags specified*, overriding any tags that are specified inside the role. If you find yourself building a role with lots of tags and you want to call subsets of the role at different times, you should consider just splitting that role into multiple roles. | ||
This *tags all of the tasks in that role with the tags specified*, appending to tags that are specified inside the role. If you find yourself building a role with lots of tags and you want to call subsets of the role at different times, you should consider just splitting that role into multiple roles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be true for import, but include shoudl have tags applied to IT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure exactly what you mean by import vs include. So it's true for roles
but not include_role
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
roles
and import_role
but not include_role
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please amend to "any tags that are already specified inside the role". Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see: import_role
is new. Much more explicit dynamic/static includes. Nice! Let me try to add that to the note without overcomplicating it.
name: foo | ||
tags: | ||
- bar | ||
- baz | ||
|
||
.. note:: | ||
This *tags all of the tasks in that role with the tags specified*, overriding any tags that are specified inside the role. If you find yourself building a role with lots of tags and you want to call subsets of the role at different times, you should consider just splitting that role into multiple roles. | ||
This *tags all of the tasks in that role with the tags specified*, appending to any tags that are specified inside the role. The tags in this example will *not* be added to tasks inside an ``include_role``. Tag the ``include_role`` task directly in order to apply tags to tasks in included roles. If you find yourself building a role with lots of tags and you want to call subsets of the role at different times, you should consider just splitting that role into multiple roles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is rather tough to explain succinctly. Let me know if this is way too opaque.
Any objections before merging? |
Thanks @samdoran! |
SUMMARY
Correct docs on how tags work on roles.
ISSUE TYPE
COMPONENT NAME
Docs
ANSIBLE VERSION
ADDITIONAL INFORMATION
Tags added at the role level are appended to task in a role and do not replace them.