From dc634bc644a8c1dc7680c3258b63d1b46fe8a05f Mon Sep 17 00:00:00 2001 From: Matt Parker Date: Mon, 25 Aug 2014 10:23:54 +0100 Subject: [PATCH] Name appears to be a required parameter As far as I can tell, `name` is a required parameter. The guard test at (now) line 458 says you need name if `state == present` and at 464 if `state != present`, although that's not quite as clear. Each of the code paths at 485 - 495 pass the name param through to `add_job`, `update_job` and `remove_job`, and the actual _update_job method earlier seems to require it too. However I don't really know python so I may be wrong, but I can't see the circumstances when `name` is not required. --- library/system/cron | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/system/cron b/library/system/cron index 29cf374d65..7fff4e1740 100644 --- a/library/system/cron +++ b/library/system/cron @@ -45,6 +45,7 @@ options: description: - Description of a crontab entry. default: null + required: true user: description: - The specific user whose crontab should be modified. @@ -395,7 +396,7 @@ def main(): module = AnsibleModule( argument_spec = dict( - name=dict(required=False), + name=dict(required=True), user=dict(required=False), job=dict(required=False), cron_file=dict(required=False),