mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 10:51:24 -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
|
@ -2118,9 +2118,6 @@ class AnsibleModule(object):
|
|||
def exit_json(self, **kwargs):
|
||||
''' return from the module, without error '''
|
||||
|
||||
if 'changed' not in kwargs:
|
||||
kwargs['changed'] = False
|
||||
|
||||
self.do_cleanup_files()
|
||||
self._return_formatted(kwargs)
|
||||
sys.exit(0)
|
||||
|
@ -2131,9 +2128,6 @@ class AnsibleModule(object):
|
|||
assert 'msg' in kwargs, "implementation error -- msg to explain the error is required"
|
||||
kwargs['failed'] = True
|
||||
|
||||
if 'changed' not in kwargs:
|
||||
kwargs['changed'] = False
|
||||
|
||||
# add traceback if debug or high verbosity and it is missing
|
||||
# Note: badly named as exception, it is really always been 'traceback'
|
||||
if 'exception' not in kwargs and sys.exc_info()[2] and (self._debug or self._verbosity >= 3):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue