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:

View file

@ -25,7 +25,6 @@
- name: set expected value for files in a single directory
set_fact:
expected:
attempts: 1
changed: False
examined: 5
failed: False
@ -109,7 +108,6 @@
- name: set fact for hidden files
set_fact:
expected:
attempts: 1
changed: False
examined: 11
failed: False
@ -152,7 +150,6 @@
- name: set fact for pattern files
set_fact:
expected:
attempts: 1
changed: False
examined: 5
failed: False
@ -191,7 +188,6 @@
- name: set expected value for files in a nested directory
set_fact:
expected:
attempts: 1
changed: False
examined: 8
failed: False
@ -261,7 +257,6 @@
- name: set expected value for files in a nested directory while following links
set_fact:
expected:
attempts: 1
changed: False
examined: 10
failed: False
@ -345,7 +340,6 @@
- name: set expected fact for directories with recurse and follow
set_fact:
expected:
attempts: 1
changed: False
examined: 2
failed: False
@ -411,7 +405,6 @@
- name: set expected fact for files by size
set_fact:
expected:
attempts: 1
changed: False
examined: 5
failed: False
@ -455,7 +448,6 @@
- name: set expected fact for files by size (less than)
set_fact:
expected:
attempts: 1
changed: False
examined: 5
failed: False

View file

@ -50,7 +50,6 @@
- name: set expected value for reg structure
set_fact:
expected:
attempts: 1
changed: false
exists: true
failed: false
@ -79,7 +78,6 @@
- name: set expected value for reg key with no sub keys but some properties
set_fact:
expected:
attempts: 1
changed: false
exists: true
failed: false
@ -103,7 +101,6 @@
- name: set expected value for reg key without sub keys or properties
set_fact:
expected:
attempts: 1
changed: false
exists: true
failed: false
@ -124,7 +121,6 @@
- name: set expected value for non-existent reg key
set_fact:
expected:
attempts: 1
changed: false
exists: false
failed: false
@ -143,7 +139,6 @@
- name: set expected string property
set_fact:
expected:
attempts: 1
changed: false
exists: true
failed: false
@ -165,7 +160,6 @@
- name: set expected expand string property
set_fact:
expected:
attempts: 1
changed: false
exists: true
failed: false
@ -187,7 +181,6 @@
- name: set expected multi string property
set_fact:
expected:
attempts: 1
changed: false
exists: true
failed: false
@ -209,7 +202,6 @@
- name: set expected binary property
set_fact:
expected:
attempts: 1
changed: false
exists: true
failed: false
@ -231,7 +223,6 @@
- name: set expected dword property
set_fact:
expected:
attempts: 1
changed: false
exists: true
failed: false
@ -253,7 +244,6 @@
- name: set expected qword property
set_fact:
expected:
attempts: 1
changed: false
exists: true
failed: false
@ -275,7 +265,6 @@
- name: set expected none property
set_fact:
expected:
attempts: 1
changed: false
exists: true
failed: false
@ -297,7 +286,6 @@
- name: set expected none with value property
set_fact:
expected:
attempts: 1
changed: false
exists: true
failed: false
@ -319,7 +307,6 @@
- name: set expected non-existence property
set_fact:
expected:
attempts: 1
changed: false
exists: false
failed: false