saltstack/salt — pull request #4167 by yvasiyarov (2013-03-20 15:33:01+00:00)
Title: Feature: Show verbose error message if cron file update failed

I've added small changes to the states/cron module:
Return verbose error message if states/cron can not apply new crontab file

Module states/cron use function "write_cron_file" from modules/cron which return only boolean value, but not error message. Since this function is public and can be used by customers I can not change its interface so I've created new function "write_cron_file_verbose".

I think this small change is useful because you can make typo in your cron tab file and when you try to apply changes you will only get response:
"Unable to update user crontab" - without any additional information.
Error message from crontab is not even written to the minion log - so you can only debug salt code to find out whats wrong with your crontab file.