diff options
author | Brian Coca <bcoca@ansible.com> | 2016-04-28 10:25:26 -0400 |
---|---|---|
committer | Brian Coca <bcoca@ansible.com> | 2016-04-28 10:25:26 -0400 |
commit | f2980fc565424adb6395de478dcb3ce9eab4e387 (patch) | |
tree | 94604d9065e1bbd5c284a91081e86af3b7f6ba1e | |
parent | 8016f8a6385d8e5d3ced2286b47e4d153ed8d955 (diff) | |
download | ansible-f2980fc565424adb6395de478dcb3ce9eab4e387.tar.gz |
clarify tags (#15647)
* clarify tags
* feedback corrections
-rw-r--r-- | docsite/rst/playbooks_tags.rst | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/docsite/rst/playbooks_tags.rst b/docsite/rst/playbooks_tags.rst index 148e9dcfb8..c26e65dcd5 100644 --- a/docsite/rst/playbooks_tags.rst +++ b/docsite/rst/playbooks_tags.rst @@ -29,20 +29,42 @@ On the other hand, if you want to run a playbook *without* certain tasks, you co ansible-playbook example.yml --skip-tags "notification" + +.. _tag_inheritance: + +Tag Inheritance +``````````````` + +You can apply tags to more than tasks, but they ONLY affect the tasks themselves. Applyng tags anywhere else is just a +convenience so you don't have to write it on every task:: + + - hosts: all + tags: + - bar + tasks: + ... + + - hosts: all + tags: ['foo'] + tasks: + ... + You may also apply tags to roles:: roles: - { role: webserver, port: 5000, tags: [ 'web', 'foo' ] } -And you may also tag basic include statements:: +And include statements:: - include: foo.yml tags: [web,foo] -Both of these apply the specified tags to every task inside the included -file or role, so that these tasks can be selectively run when the playbook +All of these apply the specified tags to EACH task inside the play, included +file, or role, so that these tasks can be selectively run when the playbook is invoked with the corresponding tags. +.. _special_tags: + Special Tags ```````````` |