Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ansible/ansible-examples.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Candeira <javier@candeira.com>2013-07-15 08:24:43 +0400
committerJavier Candeira <javier@candeira.com>2013-07-15 08:35:18 +0400
commitdd28b314b9fdea2e6d6d3e6255cc5678dd990361 (patch)
treed0115bee216337151d0211e3d0a9ebfdc958b018 /language_features
parente7832eb7daf1704879ddc6b2049bcabd27c4ec05 (diff)
document use of raw variables in loop_nested
Diffstat (limited to 'language_features')
-rw-r--r--language_features/loop_nested.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/language_features/loop_nested.yml b/language_features/loop_nested.yml
index b546bd1..2741ea5 100644
--- a/language_features/loop_nested.yml
+++ b/language_features/loop_nested.yml
@@ -8,3 +8,17 @@
- [ 'red', 'blue', 'green' ]
- [ 1, 2, 3 ]
- [ 'up', 'down', 'strange']
+
+# you can reference a raw variable name without putting it in {{ brackets }}
+
+- hosts: all
+ vars:
+ listvar1:
+ - 'a'
+ - 'b'
+ - 'c'
+ tasks:
+ - shell: echo "nested test a={{ item[0] }} b={{ item[1] }}"
+ with_nested:
+ - listvar1
+ - [ 1, 2, 3 ]