I have two cron entries that I would like put onto a machine. But puppet seems to only allow one at a time. The entries are as follows. cron { foo_sync: command => "/usr/local/sbin/svnsync", user => root, environment => ["ROOT=/scratch", "NAME=foo", "MAILTO=shenson@redhat.com"], minute => 0, } cron { bar_sync: command => "/usr/local/sbin/svnsync", user => root, environment => ["ROOT=/scratch", "NAME=bar", "MAILTO=shenson@redhat.com"], minute => 0, } In the logs I get the following. notice: //www::websync/Cron[foo_sync]/environment: environment changed ''ROOT=/scratch,NAME=bar,MAILTO=shenson@redhat.com'' to ''ROOT=/ scratch,NAME=foo,MAILTO=shenson@redhat.com'' The actual cron entry looks like: [root@websync ~]# crontab -l # HEADER: This file was autogenerated at Fri Jun 13 10:05:49 -0400 2008 by puppet. # HEADER: While it can still be managed manually, it is definitely not recommended. # HEADER: Note particularly that the comments starting with ''Puppet Name'' should # HEADER: not be deleted, as doing so could cause duplicate cron jobs. # Puppet Name: foo_sync ROOT=/scratch NAME=foo MAILTO=shenson@redhat.com I am wondering if this is expected behavior or a bug? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Fri, Jun 13, 2008 at 10:24 AM, sjh24wvu <scott.henson@gmail.com> wrote:> > I have two cron entries that I would like put onto a machine. But > puppet seems to only allow one at a time. The entries are as > follows. > > cron { foo_sync: > command => "/usr/local/sbin/svnsync", > user => root, > environment => ["ROOT=/scratch", "NAME=foo", > "MAILTO=shenson@redhat.com"], > minute => 0, > } > > cron { bar_sync: > command => "/usr/local/sbin/svnsync", > user => root, > environment => ["ROOT=/scratch", "NAME=bar", > "MAILTO=shenson@redhat.com"], > minute => 0, > } > > In the logs I get the following. > > notice: //www::websync/Cron[foo_sync]/environment: environment changed > ''ROOT=/scratch,NAME=bar,MAILTO=shenson@redhat.com'' to ''ROOT=/ > scratch,NAME=foo,MAILTO=shenson@redhat.com'' > > The actual cron entry looks like: > [root@websync ~]# crontab -l > # HEADER: This file was autogenerated at Fri Jun 13 10:05:49 -0400 > 2008 by puppet. > # HEADER: While it can still be managed manually, it is definitely not > recommended. > # HEADER: Note particularly that the comments starting with ''Puppet > Name'' should > # HEADER: not be deleted, as doing so could cause duplicate cron jobs. > # Puppet Name: foo_sync > ROOT=/scratch > NAME=foo > MAILTO=shenson@redhat.com > > > I am wondering if this is expected behavior or a bug? Thanks.This a "feature". If Puppet sees a cron job identical to the one it is told to mange, it takes control of the existing entry instead of writing a new. In this case it see two identical entrys and it is in charge of one already so it does nothing. See http://reductivelabs.com/trac/puppet/wiki/TypeReference#cron. Evan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On 6/13/2008 10:24 AM, sjh24wvu wrote:> I have two cron entries that I would like put onto a machine. But > puppet seems to only allow one at a time. The entries are as > follows. > > cron { foo_sync: > command => "/usr/local/sbin/svnsync", > user => root, > environment => ["ROOT=/scratch", "NAME=foo", > "MAILTO=shenson@redhat.com"], > minute => 0, > } > > cron { bar_sync: > command => "/usr/local/sbin/svnsync", > user => root, > environment => ["ROOT=/scratch", "NAME=bar", > "MAILTO=shenson@redhat.com"], > minute => 0, > }Can you actually have more than one set of global environment variables in a crontab? The manpage didn''t appear to say, but all their examples show only one entry of each type. But I''d bet the following would work more to your liking: Cron { # See LanguageTutorial#resource-defaults environment => [ "ROOT=/scratch", MAILTO="shenson@redhat.com" ] } cron { foo_sync: command => "NAME=foo /usr/local/sbin/svnsync", user => root, minute => 0, } cron { bar_sync: command => "NAME=bar /usr/local/sbin/svnsync", user => root, minute => 0, } -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---