Commit 1e1a943a by Matt Martz

Fix rst warnings in playbooks_loops.rst

parent 82d14553
...@@ -316,14 +316,14 @@ As you can see the formatting of packages in these lists is all over the place. ...@@ -316,14 +316,14 @@ As you can see the formatting of packages in these lists is all over the place.
That's how! That's how!
.. _writing_your_own_iterators: .. _using_register_with_a_loop:
Using register with a loop Using register with a loop
`````````````````````````` ``````````````````````````
When using ``register`` with a loop the data strucutre placed in the variable during a loop, will contain a ``results`` attribute, that is a list of all responses from the module. When using ``register`` with a loop the data strucutre placed in the variable during a loop, will contain a ``results`` attribute, that is a list of all responses from the module.
Here is an example of using ``register`` with ``with_items`` Here is an example of using ``register`` with ``with_items``::
- shell: echo "{{ item }}" - shell: echo "{{ item }}"
with_items: with_items:
...@@ -378,6 +378,8 @@ Subsequent loops over the registered variable to inspect the results may look li ...@@ -378,6 +378,8 @@ Subsequent loops over the registered variable to inspect the results may look li
when: item.rc != 0 when: item.rc != 0
with_items: echo.results with_items: echo.results
.. _writing_your_own_iterators:
Writing Your Own Iterators Writing Your Own Iterators
`````````````````````````` ``````````````````````````
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment