From 6acfa5fceef30d0839934531dde75390c02be5eb Mon Sep 17 00:00:00 2001 From: verm666 Date: Tue, 30 Jun 2015 08:14:30 -0700 Subject: [PATCH] unarchive: fix @bcoca's remarks, issue #1575 --- lib/ansible/modules/files/unarchive.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/ansible/modules/files/unarchive.py b/lib/ansible/modules/files/unarchive.py index a3544253402..3ee83de0dcd 100644 --- a/lib/ansible/modules/files/unarchive.py +++ b/lib/ansible/modules/files/unarchive.py @@ -303,10 +303,7 @@ def main(): # skip working with 0 size archives try: if os.path.getsize(src) == 0: - res_args = { - 'changed': False - } - module.exit_json(**res_args) + module.fail_json(msg="Invalid archive '%s', the file is 0 bytes" % src) except Exception, e: module.fail_json(msg="Source '%s' not readable" % src)