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 ````````````