1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Update example syntax in playbooks_tags.rst. (#35680)

This commit is contained in:
Joshua Smith 2018-02-03 06:33:02 -05:00 committed by John R Barker
parent 060890f3b2
commit e1c9c6eded

View file

@ -11,14 +11,18 @@ Example::
tasks: tasks:
- yum: name={{ item }} state=installed - yum:
name: "{{ item }}"
state: installed
loop: loop:
- httpd - httpd
- memcached - memcached
tags: tags:
- packages - packages
- template: src=templates/src.j2 dest=/etc/foo.conf - template:
src: templates/src.j2
dest: /etc/foo.conf
tags: tags:
- configuration - configuration
@ -44,17 +48,24 @@ Example::
# file: roles/common/tasks/main.yml # file: roles/common/tasks/main.yml
- name: be sure ntp is installed - name: be sure ntp is installed
yum: name=ntp state=installed yum:
name: ntp
state: installed
tags: ntp tags: ntp
- name: be sure ntp is configured - name: be sure ntp is configured
template: src=ntp.conf.j2 dest=/etc/ntp.conf template:
src: ntp.conf.j2
dest: /etc/ntp.conf
notify: notify:
- restart ntpd - restart ntpd
tags: ntp tags: ntp
- name: be sure ntpd is running and enabled - name: be sure ntpd is running and enabled
service: name=ntpd state=started enabled=yes service:
name: ntpd
state: started
enabled: yes
tags: ntp tags: ntp
.. _tag_inheritance: .. _tag_inheritance:
@ -110,11 +121,13 @@ Example::
tasks: tasks:
- debug: msg="Always runs" - debug:
msg: "Always runs"
tags: tags:
- always - always
- debug: msg="runs when you use tag1" - debug:
msg: "runs when you use tag1"
tags: tags:
- tag1 - tag1