Commit 7062cb3b by Brian Coca

removed soon to be deprecated role like include syntax

parent e16b24c0
...@@ -65,19 +65,6 @@ contain all of my wordpress tasks in a single wordpress.yml file, and use it lik ...@@ -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=alice
- include: wordpress.yml wp_user=bob - 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, Starting in 1.0, variables can also be passed to include files using an alternative syntax,
which also supports structured variables:: which also supports structured variables::
...@@ -90,6 +77,14 @@ which also supports structured variables:: ...@@ -90,6 +77,14 @@ which also supports structured variables::
- keys/one.txt - keys/one.txt
- keys/two.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. Playbooks can include other playbooks too, but that's mentioned in a later section.
.. note:: .. note::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment