Remove 'attempts' from non-looped tasks (#35316)

* Remove 'attempts' from non-looped tasks

* Use self._task.until to determine if we're in a loop

* Undo recent changes to Windows tests
This commit is contained in:
Dag Wieers 2018-01-26 16:06:03 +01:00 committed by Matt Martz
parent f910d5d16d
commit 4fa02d581d
3 changed files with 2 additions and 22 deletions

View file

@ -577,7 +577,8 @@ class TaskExecutor:
result['failed'] = False
# Make attempts and retries available early to allow their use in changed/failed_when
result['attempts'] = attempt
if self._task.until:
result['attempts'] = attempt
# set the changed property if it was missing.
if 'changed' not in result: