1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

cron - adds deprecation warnings (#37355). (#52322)

Adds deprecation warnings for both 'name', and 'reboot' option (although
not related to this change, it has been deprecated for quite a while)
This commit is contained in:
Dane Summers 2019-02-15 14:09:03 -05:00 committed by ansibot
parent f697e264cc
commit 523cb8b5a4

View file

@ -38,6 +38,7 @@ options:
- Description of a crontab entry or, if env is set, the name of environment variable.
Required if state=absent. Note that if name is not set and state=present, then a
new crontab entry will always be created, regardless of existing ones.
This parameter will always be required in future releases.
user:
description:
- The specific user whose crontab should be modified.
@ -609,6 +610,17 @@ def main():
module.debug('cron instantiated - name: "%s"' % name)
if not name:
module.deprecate(
msg="The 'name' parameter will be required in future releases.",
version='2.10'
)
if reboot:
module.deprecate(
msg="The 'reboot' parameter will be removed in future releases. Use 'special_time' option instead.",
version='2.10'
)
if module._diff:
diff = dict()
diff['before'] = crontab.existing