Incorrect changed result in cron module. Report changed=False if no cron is removed:wq
This commit is contained in:
parent
1381f80e47
commit
dd313b1b8f
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue