removed soon to be deprecated role like include syntax
This commit is contained in:
parent
e16b24c01e
commit
7062cb3bb7
1 changed files with 8 additions and 13 deletions
|
@ -65,19 +65,6 @@ contain all of my wordpress tasks in a single wordpress.yml file, and use it lik
|
|||
- include: wordpress.yml wp_user=alice
|
||||
- include: wordpress.yml wp_user=bob
|
||||
|
||||
If you are running Ansible 1.4 and later, include syntax is streamlined to match roles, and also allows passing list and dictionary parameters::
|
||||
|
||||
tasks:
|
||||
- { include: wordpress.yml, wp_user: timmy, ssh_keys: [ 'keys/one.txt', 'keys/two.txt' ] }
|
||||
|
||||
Using either syntax, variables passed in can then be used in the included files. We'll cover them in :doc:`playbooks_variables`.
|
||||
You can reference them like this::
|
||||
|
||||
{{ wp_user }}
|
||||
|
||||
(In addition to the explicitly passed-in parameters, all variables from
|
||||
the vars section are also available for use here as well.)
|
||||
|
||||
Starting in 1.0, variables can also be passed to include files using an alternative syntax,
|
||||
which also supports structured variables::
|
||||
|
||||
|
@ -90,6 +77,14 @@ which also supports structured variables::
|
|||
- keys/one.txt
|
||||
- keys/two.txt
|
||||
|
||||
Using either syntax, variables passed in can then be used in the included files. We'll cover them in :doc:`playbooks_variables`.
|
||||
You can reference them like this::
|
||||
|
||||
{{ wp_user }}
|
||||
|
||||
(In addition to the explicitly passed-in parameters, all variables from
|
||||
the vars section are also available for use here as well.)
|
||||
|
||||
Playbooks can include other playbooks too, but that's mentioned in a later section.
|
||||
|
||||
.. note::
|
||||
|
|
Loading…
Reference in a new issue