Update indentation used in the code examples, unify empty lines (#65346)
This commit is contained in:
parent
c5c1ad4fb8
commit
95aef88a45
1 changed files with 74 additions and 81 deletions
|
@ -101,7 +101,6 @@ When used in this manner, the order of execution for your playbook is as follows
|
||||||
As of Ansible 2.4, you can now use roles inline with any other tasks using ``import_role`` or ``include_role``::
|
As of Ansible 2.4, you can now use roles inline with any other tasks using ``import_role`` or ``include_role``::
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- hosts: webservers
|
- hosts: webservers
|
||||||
tasks:
|
tasks:
|
||||||
- debug:
|
- debug:
|
||||||
|
@ -121,7 +120,6 @@ When roles are defined in the classic manner, they are treated as static imports
|
||||||
The name used for the role can be a simple name (see :ref:`role_search_path` below), or it can be a fully qualified path::
|
The name used for the role can be a simple name (see :ref:`role_search_path` below), or it can be a fully qualified path::
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- hosts: webservers
|
- hosts: webservers
|
||||||
roles:
|
roles:
|
||||||
- role: '/path/to/my/roles/common'
|
- role: '/path/to/my/roles/common'
|
||||||
|
@ -129,7 +127,6 @@ The name used for the role can be a simple name (see :ref:`role_search_path` bel
|
||||||
Roles can accept other keywords::
|
Roles can accept other keywords::
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- hosts: webservers
|
- hosts: webservers
|
||||||
roles:
|
roles:
|
||||||
- common
|
- common
|
||||||
|
@ -145,7 +142,6 @@ Roles can accept other keywords::
|
||||||
Or, using the newer syntax::
|
Or, using the newer syntax::
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- hosts: webservers
|
- hosts: webservers
|
||||||
tasks:
|
tasks:
|
||||||
- include_role:
|
- include_role:
|
||||||
|
@ -158,7 +154,6 @@ Or, using the newer syntax::
|
||||||
You can conditionally import a role and execute its tasks::
|
You can conditionally import a role and execute its tasks::
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- hosts: webservers
|
- hosts: webservers
|
||||||
tasks:
|
tasks:
|
||||||
- include_role:
|
- include_role:
|
||||||
|
@ -170,7 +165,6 @@ You can conditionally import a role and execute its tasks::
|
||||||
Finally, you may wish to assign tags to the tasks inside the roles you specify. You can do::
|
Finally, you may wish to assign tags to the tasks inside the roles you specify. You can do::
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- hosts: webservers
|
- hosts: webservers
|
||||||
roles:
|
roles:
|
||||||
- role: foo
|
- role: foo
|
||||||
|
@ -183,7 +177,6 @@ Finally, you may wish to assign tags to the tasks inside the roles you specify.
|
||||||
Or, again, using the newer syntax::
|
Or, again, using the newer syntax::
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- hosts: webservers
|
- hosts: webservers
|
||||||
tasks:
|
tasks:
|
||||||
- import_role:
|
- import_role:
|
||||||
|
@ -197,6 +190,7 @@ Or, again, using the newer syntax::
|
||||||
|
|
||||||
On the other hand you might just want to tag the import of the role itself::
|
On the other hand you might just want to tag the import of the role itself::
|
||||||
|
|
||||||
|
---
|
||||||
- hosts: webservers
|
- hosts: webservers
|
||||||
tasks:
|
tasks:
|
||||||
- include_role:
|
- include_role:
|
||||||
|
@ -361,7 +355,7 @@ Assuming you had this::
|
||||||
|
|
||||||
The module will be usable in the role itself, as well as any roles that are called *after* this role, as follows::
|
The module will be usable in the role itself, as well as any roles that are called *after* this role, as follows::
|
||||||
|
|
||||||
|
---
|
||||||
- hosts: webservers
|
- hosts: webservers
|
||||||
roles:
|
roles:
|
||||||
- my_custom_modules
|
- my_custom_modules
|
||||||
|
@ -425,4 +419,3 @@ Read the `Ansible Galaxy documentation <https://galaxy.ansible.com/docs/>`_ page
|
||||||
Complete playbook files from the GitHub project source
|
Complete playbook files from the GitHub project source
|
||||||
`Mailing List <https://groups.google.com/group/ansible-project>`_
|
`Mailing List <https://groups.google.com/group/ansible-project>`_
|
||||||
Questions? Help? Ideas? Stop by the list on Google Groups
|
Questions? Help? Ideas? Stop by the list on Google Groups
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue