Fixed error in assemble module when validation failed. (#3814)

Error was: TypeError: fail_json() takes exactly 1 argument (2 given)
This commit is contained in:
Matthias Frey 2016-06-01 15:19:58 +02:00 committed by Matt Clay
parent d373e0a7c4
commit d5fc44610b

View file

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