summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2015-03-06 21:35:49 +0000
committerMaximilian Albert <maximilian.albert@gmail.com>2015-03-06 21:35:49 +0000
commitaf593c2f513e114322c3ec7841c2c1ce323ff49d (patch)
tree84136d3adeac16967856692f06aec8903816e9da
parentfb717ffd6c6afece578241fd43dce02e3287fab5 (diff)
downloadansible-af593c2f513e114322c3ec7841c2c1ce323ff49d.tar.gz
Add note to section 'Loops' that the 'when:' statement is processed per-item.
-rw-r--r--docsite/rst/playbooks_conditionals.rst2
-rw-r--r--docsite/rst/playbooks_loops.rst2
2 files changed, 4 insertions, 0 deletions
diff --git a/docsite/rst/playbooks_conditionals.rst b/docsite/rst/playbooks_conditionals.rst
index d71a0d3c7a..2474998226 100644
--- a/docsite/rst/playbooks_conditionals.rst
+++ b/docsite/rst/playbooks_conditionals.rst
@@ -11,6 +11,8 @@ whether the hosts match other criteria. There are many options to control exec
Let's dig into what they are.
+.. _the_when_statement:
+
The When Statement
``````````````````
diff --git a/docsite/rst/playbooks_loops.rst b/docsite/rst/playbooks_loops.rst
index 41e2d932c9..e71c81cefc 100644
--- a/docsite/rst/playbooks_loops.rst
+++ b/docsite/rst/playbooks_loops.rst
@@ -43,6 +43,8 @@ If you have a list of hashes, you can reference subkeys using things like::
- { name: 'testuser1', groups: 'wheel' }
- { name: 'testuser2', groups: 'root' }
+Also be aware that when combining `when` with `with_items` (or any other loop statement), the `when` statement is processed separately for each item. See :ref:`the_when_statement` for an example.
+
.. _nested_loops:
Nested Loops