Skip to content
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

Merged
merged 3 commits into from
Jun 27, 2017
Merged

Conversation

samdoran
Copy link
Contributor

SUMMARY

Correct docs on how tags work on roles.

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

Docs

ANSIBLE VERSION
2.3.1.0
ADDITIONAL INFORMATION

Tags added at the role level are appended to task in a role and do not replace them.

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.
Copy link
Member

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

Copy link
Contributor Author

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?

Copy link
Member

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

Copy link
Contributor

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!

Copy link
Contributor Author

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.

@ansibot
Copy link
Contributor

ansibot commented Jun 16, 2017

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 docs_pull_request needs_triage Needs a first human triage before being processed. labels Jun 16, 2017
@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Jun 16, 2017
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.
Copy link
Contributor Author

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.

@samdoran
Copy link
Contributor Author

Any objections before merging?

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jun 26, 2017
@dharmabumstead
Copy link
Contributor

Thanks @samdoran!

@dharmabumstead dharmabumstead merged commit 67eae34 into ansible:devel Jun 27, 2017
@samdoran samdoran deleted the sdoran-docs-fix branch June 27, 2017 17:55
@ansibot ansibot added docs This issue/PR relates to or includes documentation. and removed docs_pull_request labels Mar 4, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 docs This issue/PR relates to or includes documentation. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants