DEV Community

Discussion on: Consequences of updating cron jobs within Ansible's playbook

Collapse
 
tamasgal profile image
Tamas Gal

Interesting, thanks for the wrap-up! Btw. I'd highly recommend using different files instead, via the cron_file parameter. This way, the jobs are isolated in /etc/cron.d (of course, applicable to other configurations as well) and you don't run into the trouble of having leftovers in a file, which could potentially be managed by multiple tasks. (happened to me ;)

Collapse
 
wnbsmart profile image
Maroje Macola

Hey Thomas, thanks for mentioning cron_file parameter, haven't seen it before!
If I encounter this situation again, this could be very handy, especially regarding leftovers :)