From 7062cb3bb7c17222832292ea5235d4661d8284cc Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 6 Aug 2015 16:54:13 -0400 Subject: [PATCH] removed soon to be deprecated role like include syntax --- docsite/rst/playbooks_roles.rst | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/docsite/rst/playbooks_roles.rst b/docsite/rst/playbooks_roles.rst index 52e69a66df6..2cc98117a46 100644 --- a/docsite/rst/playbooks_roles.rst +++ b/docsite/rst/playbooks_roles.rst @@ -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::