cron: Work even without initial crontab

Fixes #2165.
parent a875b637
......@@ -333,12 +333,9 @@ def main():
os.unlink(backupfile)
module.exit_json(changed=changed,cron_file=cron_file,state=state)
if (rc != 0):
module.fail_json(msg=err)
if changed:
# If the file is empty - remove it
if rm:
if rm and cron_file:
remove_job_file(cron_file)
else:
if backup:
......
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