From 8e2a8c92ac7c4134f822ec77de08a1106da36fc6 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 6 Nov 2014 08:20:01 -0500 Subject: [PATCH] changed examples to not have a non working variable that gets confused with directives as per #9264 --- docsite/rst/playbooks_roles.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docsite/rst/playbooks_roles.rst b/docsite/rst/playbooks_roles.rst index 0d847b3278..3ffabe835d 100644 --- a/docsite/rst/playbooks_roles.rst +++ b/docsite/rst/playbooks_roles.rst @@ -61,19 +61,19 @@ For instance, if deploying multiple wordpress instances, I could contain all of my wordpress tasks in a single wordpress.yml file, and use it like so:: tasks: - - include: wordpress.yml user=timmy - - include: wordpress.yml user=alice - - include: wordpress.yml user=bob + - include: wordpress.yml wp_user=timmy + - 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, user: timmy, ssh_keys: [ 'keys/one.txt', 'keys/two.txt' ] } + - { 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:: - {{ user }} + {{ wp_user }} (In addition to the explicitly passed-in parameters, all variables from the vars section are also available for use here as well.) @@ -85,7 +85,7 @@ which also supports structured variables:: - include: wordpress.yml vars: - remote_user: timmy + wp_user: timmy some_list_variable: - alpha - beta