summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam L. Thomson Jr <wlt@o-sinc.com>2016-11-15 17:16:04 -0500
committerscottb <sydtech@gmail.com>2016-11-15 14:16:04 -0800
commitfe95d71fbd0b916e538480b5df93fa93e0b23585 (patch)
tree56b422ef53175cb45557347da5e6a3a6fcf05e2f
parent387ad9a980f97603b4c9f7c87548407b44140274 (diff)
downloadansible-fe95d71fbd0b916e538480b5df93fa93e0b23585.tar.gz
docsite/rst/playbooks_tags.rst: Added section on tag reuse (#17729)
* docsite/rst/playbooks_tags.rst: Added section on tag reuse * Update playbooks_tags.rst Minor grammatical clarification.
-rw-r--r--docsite/rst/playbooks_tags.rst25
1 files changed, 25 insertions, 0 deletions
diff --git a/docsite/rst/playbooks_tags.rst b/docsite/rst/playbooks_tags.rst
index f6ab523cb6..76d1ec0fdf 100644
--- a/docsite/rst/playbooks_tags.rst
+++ b/docsite/rst/playbooks_tags.rst
@@ -30,6 +30,31 @@ On the other hand, if you want to run a playbook *without* certain tasks, you co
ansible-playbook example.yml --skip-tags "notification"
+.. _tag_reuse:
+
+Tag Resuse
+```````````````
+You can apply the same tag name to more than one task, in the same file
+or included files. This will run all tasks with that tag.
+
+Example::
+ ---
+ # file: roles/common/tasks/main.yml
+
+ - name: be sure ntp is installed
+ yum: name=ntp state=installed
+ tags: ntp
+
+ - name: be sure ntp is configured
+ template: src=ntp.conf.j2 dest=/etc/ntp.conf
+ notify:
+ - restart ntpd
+ tags: ntp
+
+ - name: be sure ntpd is running and enabled
+ service: name=ntpd state=started enabled=yes
+ tags: ntp
+
.. _tag_inheritance:
Tag Inheritance