parent
a1709bf0f9
commit
ce584571e8
|
@ -752,11 +752,10 @@ def main():
|
|||
res_args['diff'] = diff
|
||||
|
||||
# retain the backup only if crontab or cron file have changed
|
||||
if backup:
|
||||
if backup and not module.check_mode:
|
||||
if changed:
|
||||
res_args['backup_file'] = backup_file
|
||||
else:
|
||||
if not module.check_mode:
|
||||
os.unlink(backup_file)
|
||||
|
||||
if cron_file:
|
||||
|
|
Loading…
Reference in New Issue