mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-09 17:59:09 -07:00
better backwards compat handling of status
restored 'rc' inspection but only when failed is not specified removed redundant changed from basic.py as task_executor already adds removed redundant filters, they are tests added aliases to tests removed from filters fixed test to new rc handling
This commit is contained in:
parent
fba76444e0
commit
2a041d10d2
6 changed files with 36 additions and 101 deletions
|
@ -572,7 +572,11 @@ class TaskExecutor:
|
|||
|
||||
# set the failed property if it was missing.
|
||||
if 'failed' not in result:
|
||||
result['failed'] = False
|
||||
# rc is here for backwards compatibility and modules that use it instead of 'failed'
|
||||
if 'rc' in result and result['rc'] not in [0, "0"]:
|
||||
result['failed'] = True
|
||||
else:
|
||||
result['failed'] = False
|
||||
|
||||
# set the changed property if it was missing.
|
||||
if 'changed' not in result:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue