Clarify that index_var is 0 indexed (#70548)

A little further down the page is another index, ansible_loop.index, which shares a similar description but is 1 indexed.
Its zero indexed twin has a 0 suffix.

``ansible_loop.index``      The current iteration of the loop. (1 indexed)
``ansible_loop.index0``     The current iteration of the loop. (0 indexed)

To remove ambiguity around the usage of index_var, explicitly mention that this variable is 0 indexed.
pull/70624/head
Karl Goetz 4 years ago committed by GitHub
parent f4ea43c4a0
commit c410311f55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -352,6 +352,8 @@ To keep track of where you are in a loop, use the ``index_var`` directive with `
loop_control:
index_var: my_idx
.. note:: `index_var` is 0 indexed.
Defining inner and outer variable names with ``loop_var``
---------------------------------------------------------
.. versionadded:: 2.1

Loading…
Cancel
Save