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