docs: tags: streamline indentation (#50875)

* docs: tags: streamline indentation to minimal indent
This commit is contained in:
René Moser 2019-01-15 15:54:38 +01:00 committed by Alicia Cozine
commit d60d794411

View file

@ -98,7 +98,7 @@ tagged with 'bar', and the second has all its tasks tagged with 'foo'::
... ...
- hosts: all - hosts: all
tags: ['foo'] tags: [ foo ]
tasks: tasks:
... ...
@ -108,16 +108,16 @@ You may also apply tags to the tasks imported by ``roles``::
- role: webserver - role: webserver
vars: vars:
port: 5000 port: 5000
tags: [ 'web', 'foo' ] tags: [ web, foo ]
And to ``import_role:`` and ``import_tasks:`` statements:: And to ``import_role:`` and ``import_tasks:`` statements::
- import_role: - import_role:
name: myrole name: myrole
tags: [web,foo] tags: [ web, foo ]
- import_tasks: foo.yml - import_tasks: foo.yml
tags: [web,foo] tags: [ web, foo ]
All of these apply the specified tags to EACH task inside the play, imported All of these apply the specified tags to EACH task inside the play, imported
@ -179,7 +179,6 @@ There is a special ``always`` tag that will always run a task, unless specifical
Example:: Example::
tasks: tasks:
- debug: - debug:
msg: "Always runs" msg: "Always runs"
tags: tags:
@ -197,8 +196,8 @@ Another special tag is ``never``, which will prevent a task from running unless
Example:: Example::
tasks: tasks:
- debug: msg='{{ showmevar}}' - debug: msg="{{ showmevar}}"
tags: [ 'never', 'debug' ] tags: [ never, debug ]
In this example, the task will only run when the ``debug`` or ``never`` tag is explicitly requested. In this example, the task will only run when the ``debug`` or ``never`` tag is explicitly requested.
@ -218,7 +217,3 @@ By default, Ansible runs as if ``--tags all`` had been specified.
Have a question? Stop by the google group! Have a question? Stop by the google group!
`irc.freenode.net <http://irc.freenode.net>`_ `irc.freenode.net <http://irc.freenode.net>`_
#ansible IRC chat channel #ansible IRC chat channel