|
|
|
@ -66,7 +66,7 @@ def main():
|
|
|
|
|
log_path = os.path.join(logdir, jid)
|
|
|
|
|
|
|
|
|
|
if not os.path.exists(log_path):
|
|
|
|
|
module.fail_json(msg="could not find job", ansible_job_id=jid)
|
|
|
|
|
module.fail_json(msg="could not find job", ansible_job_id=jid, started=1, finished=1)
|
|
|
|
|
|
|
|
|
|
if mode == 'cleanup':
|
|
|
|
|
os.unlink(log_path)
|
|
|
|
@ -85,7 +85,7 @@ def main():
|
|
|
|
|
module.exit_json(results_file=log_path, ansible_job_id=jid, started=1, finished=0)
|
|
|
|
|
else:
|
|
|
|
|
module.fail_json(ansible_job_id=jid, results_file=log_path,
|
|
|
|
|
msg="Could not parse job output: %s" % data)
|
|
|
|
|
msg="Could not parse job output: %s" % data, started=1, finished=1)
|
|
|
|
|
|
|
|
|
|
if not 'started' in data:
|
|
|
|
|
data['finished'] = 1
|
|
|
|
|