1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Incorrect changed result in cron module.
Report changed=False if no cron is removed:wq
This commit is contained in:
Jim Richardson 2013-11-03 17:43:51 -08:00
parent eab6737209
commit bcc08564e7

View file

@ -464,8 +464,10 @@ def main():
crontab.write(backup_file) crontab.write(backup_file)
if crontab.cron_file and not do_install: if crontab.cron_file and not do_install:
crontab.remove_job_file() if crontab.remove_job_file():
changed = True changed = True
else:
changed = False
module.exit_json(changed=changed,cron_file=cron_file,state=state) module.exit_json(changed=changed,cron_file=cron_file,state=state)
job = crontab.get_cron_job(minute, hour, day, month, weekday, job, special_time) job = crontab.get_cron_job(minute, hour, day, month, weekday, job, special_time)