Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docsite/rst/playbooks_tags.rst: Added section on tag reuse #17729

Merged
merged 2 commits into from
Nov 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 25 additions & 0 deletions docsite/rst/playbooks_tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down