Hi, I''d like to establish and maintain a standard crontab using Puppet. What is best practice? I don''t want to invent too much. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/190380fd-fcd3-4a6e-9410-ed83b5d50388%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
On Monday, December 9, 2013 4:43:25 PM UTC-6, Stuart Cracraft wrote:> > Hi, I''d like to establish and maintain a standard crontab > using Puppet. What is best practice? I don''t want to invent > too much. > >This is what the built-in Cron resource is for. There are currently a few caveats: 1. Puppet adorns each cron job it creates with a descriptive comment that it thereafter uses to match that job to the title of the corresponding Puppet resource. 2. As such, Puppet does not recognize or manage jobs that it did not create, or from which the special comment has been stripped. 3. It works only via the ''crontab'' command, not recognizing /etc/cron.d or any other alternative mechanism for scheduling periodic jobs. 4. Unmanaged jobs cannot be automatically purged (unlike, for example, unmanaged users). There is work under way in the community to make improvements in some of these areas. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6410f808-6a5f-4abf-9a26-8288fc594d32%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Yes, but I''d like to add: On 12/10/2013 12:19 AM, jcbollinger wrote:> 2. As such, Puppet does not recognize or manage jobs that it did not > create, or from which the special comment has been stripped.Actually, the crontab provider *will* try to match unmanaged crontab entries to resources from the catalog. $ crontab -l @reboot /bin/date $ puppet apply -e ''cron { "foo": special => "reboot", command => "/bin/date", ensure => absent }'' --noop ... Notice: /Stage[main]//Cron[foo]/ensure: current_value present, should be absent (noop) And, if unlike in this example, it won''t remove the existing entry, it *will* instead add the adorning special comment.> 4. Unmanaged jobs cannot be automatically purged (unlike, for example, > unmanaged users)....*yet* ;-) Cheers, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52A6E4AC.7030301%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/groups/opt_out.