Improve consistency of loop documentation (#55674)

There were a series of sections with subheadings in the loop
documentation, but the most recent additions did not follow the same
pattern.
This commit is contained in:
Lars Kellogg-Stedman 2019-04-23 17:39:14 -04:00 committed by Alicia Cozine
parent 79198cad7a
commit a5cb47d697

View file

@ -376,6 +376,8 @@ You can specify the name of the variable for each loop using ``loop_var`` with `
.. note:: If Ansible detects that the current loop is using a variable which has already been defined, it will raise an error to fail the task.
Extended loop variables
-----------------------
.. versionadded:: 2.8
As of Ansible 2.8 you can get extended loop information using the ``extended`` option to loop control. This option will expose the following information.
@ -400,6 +402,8 @@ Variable Description
loop_control:
extended: yes
Accessing the name of your loop_var
-----------------------------------
.. versionadded:: 2.8
As of Ansible 2.8 you can get the name of the value provided to ``loop_control.loop_var`` using the ``ansible_loop_var`` variable