mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
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:
parent
f910d5d16d
commit
4fa02d581d
3 changed files with 2 additions and 22 deletions
|
@ -577,7 +577,8 @@ class TaskExecutor:
|
||||||
result['failed'] = False
|
result['failed'] = False
|
||||||
|
|
||||||
# Make attempts and retries available early to allow their use in changed/failed_when
|
# 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.
|
# set the changed property if it was missing.
|
||||||
if 'changed' not in result:
|
if 'changed' not in result:
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
- name: set expected value for files in a single directory
|
- name: set expected value for files in a single directory
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: False
|
changed: False
|
||||||
examined: 5
|
examined: 5
|
||||||
failed: False
|
failed: False
|
||||||
|
@ -109,7 +108,6 @@
|
||||||
- name: set fact for hidden files
|
- name: set fact for hidden files
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: False
|
changed: False
|
||||||
examined: 11
|
examined: 11
|
||||||
failed: False
|
failed: False
|
||||||
|
@ -152,7 +150,6 @@
|
||||||
- name: set fact for pattern files
|
- name: set fact for pattern files
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: False
|
changed: False
|
||||||
examined: 5
|
examined: 5
|
||||||
failed: False
|
failed: False
|
||||||
|
@ -191,7 +188,6 @@
|
||||||
- name: set expected value for files in a nested directory
|
- name: set expected value for files in a nested directory
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: False
|
changed: False
|
||||||
examined: 8
|
examined: 8
|
||||||
failed: False
|
failed: False
|
||||||
|
@ -261,7 +257,6 @@
|
||||||
- name: set expected value for files in a nested directory while following links
|
- name: set expected value for files in a nested directory while following links
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: False
|
changed: False
|
||||||
examined: 10
|
examined: 10
|
||||||
failed: False
|
failed: False
|
||||||
|
@ -345,7 +340,6 @@
|
||||||
- name: set expected fact for directories with recurse and follow
|
- name: set expected fact for directories with recurse and follow
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: False
|
changed: False
|
||||||
examined: 2
|
examined: 2
|
||||||
failed: False
|
failed: False
|
||||||
|
@ -411,7 +405,6 @@
|
||||||
- name: set expected fact for files by size
|
- name: set expected fact for files by size
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: False
|
changed: False
|
||||||
examined: 5
|
examined: 5
|
||||||
failed: False
|
failed: False
|
||||||
|
@ -455,7 +448,6 @@
|
||||||
- name: set expected fact for files by size (less than)
|
- name: set expected fact for files by size (less than)
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: False
|
changed: False
|
||||||
examined: 5
|
examined: 5
|
||||||
failed: False
|
failed: False
|
||||||
|
|
|
@ -50,7 +50,6 @@
|
||||||
- name: set expected value for reg structure
|
- name: set expected value for reg structure
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: false
|
changed: false
|
||||||
exists: true
|
exists: true
|
||||||
failed: false
|
failed: false
|
||||||
|
@ -79,7 +78,6 @@
|
||||||
- name: set expected value for reg key with no sub keys but some properties
|
- name: set expected value for reg key with no sub keys but some properties
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: false
|
changed: false
|
||||||
exists: true
|
exists: true
|
||||||
failed: false
|
failed: false
|
||||||
|
@ -103,7 +101,6 @@
|
||||||
- name: set expected value for reg key without sub keys or properties
|
- name: set expected value for reg key without sub keys or properties
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: false
|
changed: false
|
||||||
exists: true
|
exists: true
|
||||||
failed: false
|
failed: false
|
||||||
|
@ -124,7 +121,6 @@
|
||||||
- name: set expected value for non-existent reg key
|
- name: set expected value for non-existent reg key
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: false
|
changed: false
|
||||||
exists: false
|
exists: false
|
||||||
failed: false
|
failed: false
|
||||||
|
@ -143,7 +139,6 @@
|
||||||
- name: set expected string property
|
- name: set expected string property
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: false
|
changed: false
|
||||||
exists: true
|
exists: true
|
||||||
failed: false
|
failed: false
|
||||||
|
@ -165,7 +160,6 @@
|
||||||
- name: set expected expand string property
|
- name: set expected expand string property
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: false
|
changed: false
|
||||||
exists: true
|
exists: true
|
||||||
failed: false
|
failed: false
|
||||||
|
@ -187,7 +181,6 @@
|
||||||
- name: set expected multi string property
|
- name: set expected multi string property
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: false
|
changed: false
|
||||||
exists: true
|
exists: true
|
||||||
failed: false
|
failed: false
|
||||||
|
@ -209,7 +202,6 @@
|
||||||
- name: set expected binary property
|
- name: set expected binary property
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: false
|
changed: false
|
||||||
exists: true
|
exists: true
|
||||||
failed: false
|
failed: false
|
||||||
|
@ -231,7 +223,6 @@
|
||||||
- name: set expected dword property
|
- name: set expected dword property
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: false
|
changed: false
|
||||||
exists: true
|
exists: true
|
||||||
failed: false
|
failed: false
|
||||||
|
@ -253,7 +244,6 @@
|
||||||
- name: set expected qword property
|
- name: set expected qword property
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: false
|
changed: false
|
||||||
exists: true
|
exists: true
|
||||||
failed: false
|
failed: false
|
||||||
|
@ -275,7 +265,6 @@
|
||||||
- name: set expected none property
|
- name: set expected none property
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: false
|
changed: false
|
||||||
exists: true
|
exists: true
|
||||||
failed: false
|
failed: false
|
||||||
|
@ -297,7 +286,6 @@
|
||||||
- name: set expected none with value property
|
- name: set expected none with value property
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: false
|
changed: false
|
||||||
exists: true
|
exists: true
|
||||||
failed: false
|
failed: false
|
||||||
|
@ -319,7 +307,6 @@
|
||||||
- name: set expected non-existence property
|
- name: set expected non-existence property
|
||||||
set_fact:
|
set_fact:
|
||||||
expected:
|
expected:
|
||||||
attempts: 1
|
|
||||||
changed: false
|
changed: false
|
||||||
exists: false
|
exists: false
|
||||||
failed: false
|
failed: false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue