1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Update vars for loop_control on each loop iteration (fixes #38899) (#39818)

This commit is contained in:
Andrew Gaffney 2018-05-07 15:51:46 -05:00 committed by Matt Martz
parent 72ebd1bf46
commit 01e8139d74

View file

@ -302,6 +302,9 @@ class TaskExecutor:
if index_var: if index_var:
task_vars[index_var] = item_index task_vars[index_var] = item_index
# Update template vars to reflect current loop iteration
templar.set_available_variables(task_vars)
# pause between loop iterations # pause between loop iterations
if loop_pause and ran_once: if loop_pause and ran_once:
try: try: