Example of how to do nested loops. 15 minutes of code :)
This commit is contained in:
parent
edc04d61f3
commit
0dbfa02f0c
1 changed files with 10 additions and 0 deletions
10
examples/playbooks/loop_nested.yml
Normal file
10
examples/playbooks/loop_nested.yml
Normal file
|
@ -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']
|
Loading…
Reference in a new issue