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.
This commit is contained in:
Matt Parker 2014-08-25 10:23:54 +01:00
parent 57dee4545b
commit dc634bc644

View file

@ -45,6 +45,7 @@ options:
description: description:
- Description of a crontab entry. - Description of a crontab entry.
default: null default: null
required: true
user: user:
description: description:
- The specific user whose crontab should be modified. - The specific user whose crontab should be modified.
@ -395,7 +396,7 @@ def main():
module = AnsibleModule( module = AnsibleModule(
argument_spec = dict( argument_spec = dict(
name=dict(required=False), name=dict(required=True),
user=dict(required=False), user=dict(required=False),
job=dict(required=False), job=dict(required=False),
cron_file=dict(required=False), cron_file=dict(required=False),