Add info about loop based on jinja2 loop var (#42134)

* Add info about loop based on jinja2 loop var

* ansible_loop

* Update test count

* Add extended loop_control that defines whether ansible_loop should be added

* Extended needs to be defaulted

* Revert "Update test count"

This reverts commit f1e93ee469825f4cdcd90fb28667d29aa088275c.

* Add docs about loop_control.extended

* Add revindex and revindex0

* Document ansible_loop in special vars

* Add changelog fragment

* Add tests, change items to allitems so that dot notation works, fix logic error with previtem
This commit is contained in:
Matt Martz 2018-12-07 13:49:50 -06:00 committed by GitHub
commit 9007dbec2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 117 additions and 0 deletions

View file

@ -29,6 +29,7 @@ class LoopControl(FieldAttributeBase):
_index_var = FieldAttribute(isa='str')
_label = FieldAttribute(isa='str')
_pause = FieldAttribute(isa='int', default=0)
_extended = FieldAttribute(isa='bool')
def __init__(self):
super(LoopControl, self).__init__()