From 17cbbcdd30df993bef77e65d1f52d4f9ccb5e25b Mon Sep 17 00:00:00 2001 From: nextus Date: Thu, 14 Nov 2013 13:22:56 +0400 Subject: [PATCH] Don't allow cron module to delete cron_file without name parameter assignment --- library/system/cron | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/system/cron b/library/system/cron index b04fe23ea5..8f783d24c0 100644 --- a/library/system/cron +++ b/library/system/cron @@ -455,6 +455,9 @@ def main(): if job is None and do_install: module.fail_json(msg="You must specify 'job' to install a new cron job") + if job and name is None and not do_install: + module.fail_json(msg="You must specify 'name' to remove a cron job") + if reboot: if special_time: module.fail_json(msg="reboot and special_time are mutually exclusive")