docs: tags: streamline indentation (#50875)
* docs: tags: streamline indentation to minimal indent
This commit is contained in:
parent
df6d1aec56
commit
d60d794411
1 changed files with 32 additions and 37 deletions
|
@ -98,7 +98,7 @@ tagged with 'bar', and the second has all its tasks tagged with 'foo'::
|
|||
...
|
||||
|
||||
- hosts: all
|
||||
tags: ['foo']
|
||||
tags: [ foo ]
|
||||
tasks:
|
||||
...
|
||||
|
||||
|
@ -108,16 +108,16 @@ You may also apply tags to the tasks imported by ``roles``::
|
|||
- role: webserver
|
||||
vars:
|
||||
port: 5000
|
||||
tags: [ 'web', 'foo' ]
|
||||
tags: [ web, foo ]
|
||||
|
||||
And to ``import_role:`` and ``import_tasks:`` statements::
|
||||
|
||||
- import_role:
|
||||
name: myrole
|
||||
tags: [web,foo]
|
||||
tags: [ web, foo ]
|
||||
|
||||
- import_tasks: foo.yml
|
||||
tags: [web,foo]
|
||||
tags: [ web, foo ]
|
||||
|
||||
|
||||
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::
|
||||
|
||||
tasks:
|
||||
|
||||
- debug:
|
||||
msg: "Always runs"
|
||||
tags:
|
||||
|
@ -197,8 +196,8 @@ Another special tag is ``never``, which will prevent a task from running unless
|
|||
Example::
|
||||
|
||||
tasks:
|
||||
- debug: msg='{{ showmevar}}'
|
||||
tags: [ 'never', 'debug' ]
|
||||
- debug: msg="{{ showmevar}}"
|
||||
tags: [ never, debug ]
|
||||
|
||||
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!
|
||||
`irc.freenode.net <http://irc.freenode.net>`_
|
||||
#ansible IRC chat channel
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue