1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add unpack results to error output, for debugging purposes on failure

This may help understand what is going on with #3631
This commit is contained in:
Dag Wieers 2016-05-15 11:57:02 +02:00 committed by Matt Clay
parent 286a46e8b4
commit f7fcb81dd9

View file

@ -768,7 +768,7 @@ def main():
if res_args['extract_results']['rc'] != 0:
module.fail_json(msg="failed to unpack %s to %s" % (src, dest), **res_args)
except IOError:
module.fail_json(msg="failed to unpack %s to %s" % (src, dest))
module.fail_json(msg="failed to unpack %s to %s" % (src, dest), **res_args)
else:
res_args['changed'] = True
@ -784,7 +784,7 @@ def main():
res_args['changed'] = module.set_fs_attributes_if_different(file_args, res_args['changed'])
except (IOError, OSError):
e = get_exception()
module.fail_json(msg="Unexpected error when accessing exploded file: %s" % str(e))
module.fail_json(msg="Unexpected error when accessing exploded file: %s" % str(e), **res_args)
if module.params['list_files']:
res_args['files'] = handler.files_in_archive