summaryrefslogtreecommitdiff
path: root/3 resources/ansible/nested-loops.md
diff options
context:
space:
mode:
Diffstat (limited to '3 resources/ansible/nested-loops.md')
-rw-r--r--3 resources/ansible/nested-loops.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/3 resources/ansible/nested-loops.md b/3 resources/ansible/nested-loops.md
new file mode 100644
index 0000000..3a5be97
--- /dev/null
+++ b/3 resources/ansible/nested-loops.md
@@ -0,0 +1,3 @@
+Nested loops can be done not by nesting loops over two separate lists, but by looping over the [[cartesian-product]] of the two using the `product` filter.
+
+`{{ list1 | product(list) | list }}` \ No newline at end of file