mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #10404 from maxalbert/doc_enhancement
Add note to section 'Loops' that the 'when:' statement is processed per-item
This commit is contained in:
commit
0ff77b3650
2 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
``````````````````
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue