Commit bcc08564 by Jim Richardson

fix for https://github.com/ansible/ansible/issues/4795

Incorrect changed result in cron module.
Report changed=False if no cron is removed:wq
parent eab67372
......@@ -464,8 +464,10 @@ def main():
crontab.write(backup_file)
if crontab.cron_file and not do_install:
crontab.remove_job_file()
changed = True
if crontab.remove_job_file():
changed = True
else:
changed = False
module.exit_json(changed=changed,cron_file=cron_file,state=state)
job = crontab.get_cron_job(minute, hour, day, month, weekday, job, special_time)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment