diff options
author | Tim Gerla <tim@gerla.net> | 2015-11-02 17:47:18 +0100 |
---|---|---|
committer | Tim Gerla <tim@gerla.net> | 2015-11-02 17:47:18 +0100 |
commit | 9008b7b0e718475ce33a29f6b5be661a4e0d4631 (patch) | |
tree | d51abe251ef9ae0ec20df231538305d43b71b1a5 /docsite | |
parent | added ipify_facts to changelog (diff) | |
download | ansible-9008b7b0e718475ce33a29f6b5be661a4e0d4631.tar.xz ansible-9008b7b0e718475ce33a29f6b5be661a4e0d4631.zip |
Clarify how tagged roles work
This is a confusing part of roles and tags. Most people assume that tagging a role means that the tagged tasks inside the role will run based on the tags specified. But in reality, it tags the whole role with those tags.
Diffstat (limited to 'docsite')
-rw-r--r-- | docsite/rst/playbooks_roles.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/docsite/rst/playbooks_roles.rst b/docsite/rst/playbooks_roles.rst index 2cc98117a4..516403ac80 100644 --- a/docsite/rst/playbooks_roles.rst +++ b/docsite/rst/playbooks_roles.rst @@ -238,6 +238,7 @@ Finally, you may wish to assign tags to the roles you specify. You can do so inl roles: - { role: foo, tags: ["bar", "baz"] } +Note that 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. If the play still has a 'tasks' section, those tasks are executed after roles are applied. |