Cron - Explicitly fail on Solaris when given a special_time (#24898)

* Added explicit failure on Solaris given a special_time

Fixes ansible/ansible#22145

* Using get_platform from module utils
pull/25322/head
Evan Kaufman 8 years ago committed by René Moser
parent ea56d18c99
commit b244397a31

@ -656,6 +656,10 @@ def main():
(True in [(x != '*') for x in [minute, hour, day, month, weekday]]):
module.fail_json(msg="You must specify time and date fields or special time.")
# cannot support special_time on solaris
if (special_time or reboot) and get_platform() == 'SunOS':
module.fail_json(msg="Solaris does not support special_time=... or @reboot")
if cron_file and do_install:
if not user:
module.fail_json(msg="To use cron_file=... parameter you must specify user=... as well")

Loading…
Cancel
Save