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:
Brian Coca 2017-07-05 13:50:32 -04:00 committed by Brian Coca
parent fba76444e0
commit 2a041d10d2
6 changed files with 36 additions and 101 deletions

View file

@ -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: