From 0dbfa02f0c28495b9a9b9e1ff1af87fe80dc285c Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Mon, 11 Mar 2013 17:49:01 -0400 Subject: [PATCH] Example of how to do nested loops. 15 minutes of code :) --- examples/playbooks/loop_nested.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 examples/playbooks/loop_nested.yml diff --git a/examples/playbooks/loop_nested.yml b/examples/playbooks/loop_nested.yml new file mode 100644 index 0000000000..f0b35a49fd --- /dev/null +++ b/examples/playbooks/loop_nested.yml @@ -0,0 +1,10 @@ +--- +# this is a trivial example of how to do a nested loop. + +- hosts: all + tasks: + - shell: echo 'nested test a=${item.0} b=${item.1} c=${item.2}' + with_nested: + - [ 'red', 'blue', 'green' ] + - [ 1, 2, 3 ] + - [ 'up', 'down', 'strange']