diff --git a/lib/ansible/modules/files/assemble.py b/lib/ansible/modules/files/assemble.py index d8cb5f25577..c4ce6a7eeac 100644 --- a/lib/ansible/modules/files/assemble.py +++ b/lib/ansible/modules/files/assemble.py @@ -260,8 +260,7 @@ def main(): result['validation'] = dict(rc=rc, stdout=out, stderr=err) if rc != 0: cleanup(path) - result['msg'] = "failed to validate: rc:%s error:%s" % (rc, err) - module.fail_json(result) + module.fail_json(msg="failed to validate: rc:%s error:%s" % (rc, err)) if backup and dest_hash is not None: result['backup_file'] = module.backup_local(dest)