On Wed, Nov 20, 2013 at 6:09 PM, Felix Frank <[email protected]> wrote: > I've been looking at the redmine ticket in [1], which basically asks for > the ability to purge crontab entries from *all* users' crontabs. As is,
[ Please excuse the perhaps grumpy sounding tone. I am mainly surprised/confounded :-) ] Why all the bikeshedding on using the crontab facility, when /etc/cron.d works like a charm? If puppet is to have a better way to handle cronjobs, the IMHO clearly sane approach would be files under /etc/cron.d . There puppet can assume complete control of a given file, control the name of the file, etc. Two easy approaches are evident: install one file per cronjob defined, or manage one big file that piles up all the puppet-controlled cronjobs for that host. I am sure those options can be expanded and refined to handle pretty much any situation we throw at it. Having built systems over many years -- I cannot imagine a way of handling cronjobs through the "crontab" facility that doesn't end up being rather brittle eating data occasionally. I will also note that this is a different case from authorized keys, and that taking inspiration from the authorized keys handling code might be a bad idea: - authorized_keys isn't giving us a convenient "conf.d" directory structure - authorized_keys _can_ hold old/stale/redundant entries sanely, one rarely prunes it, where old/invalid cronjobs are an immediate source of trouble - authorized keys can hold duplicate entries without breaking, and duplicate entries are safe to prune. Duplicated cronjobs are both a valid configuration, and very bad news if not intended. IOWs, it is an altogether different kind of fish. Maybe model it on something that has conf.d style support ( https://forge.puppetlabs.com/puppetlabs/apache ? ) The infra I manage currently has all its cronjobs handled by puppet as files under /etc/cron.d. It would naturally be more elegant to be able to define the cronjob in a .pp file, and have Puppet handle the file itself. But messing with crontab... options like "purge" that remove data blindly ... dragons be there... m -- [email protected] - ask interesting questions - don't get distracted with shiny stuff - working code first ~ http://docs.moodle.org/en/User:Martin_Langhoff -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CACPiFCJbXvQV-pQC%3DdZuRZBRTV0XTi5XVyrjM5ZT-033UvL7cA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
