Skip to content

Commit

Permalink
Update vars for loop_control on each loop iteration (fixes ansible#38899
Browse files Browse the repository at this point in the history
  • Loading branch information
agaffney authored and Alexander Bethke committed May 14, 2018
1 parent 9052ae9 commit f6d74fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ansible/executor/task_executor.py
Expand Up @@ -302,6 +302,9 @@ def _run_loop(self, items):
if index_var:
task_vars[index_var] = item_index

# Update template vars to reflect current loop iteration
templar.set_available_variables(task_vars)

# pause between loop iterations
if loop_pause and ran_once:
try:
Expand Down

0 comments on commit f6d74fd

Please sign in to comment.