On Fri, Jan 21, 2011 at 7:49 AM, Antony Mayi <antonym...@yahoo.com> wrote:
> Hi,
> I am trying to cleanup the puppet reports on the master by puppet itself
> using the tidy type however want to run it once a day not every 30 minutes.
> I would expect following code does the trick:
> schedule { daily:
>   period => daily,
> }
> tidy { "/var/lib/puppet/reports":
>   age => "1w",
>   recurse => true,
>   matches => "*.yaml",
>   schedule => daily
> }
> however it runs still every 30 minutes and I am getting huge report of
> tidied logs every half an hour.
> what am I doing wrong? how can I change the scheduler for this job to be run
> only once a day?

Schedule daily appears to be something that's already defined in
puppet, so I would use a different title.

Do you get a log of the event in your state.yaml? For example:

schedule {
  once:
  period => daily,
}

exec {
  "/bin/date > /tmp/time":
    schedule => once,
}

/var/lib/puppet/state/state.yaml:
  "Exec[/usr/bin/date > /tmp/time]":
    !ruby/sym checked: 2011-01-21 20:23:33.869328 -05:00
    !ruby/sym synced: 2011-01-21 20:23:33.870815 -05:00

So in your case, you should have something along the line of:
  "Tidy[/var/lib/puppet/reports]":
    !ruby/sym checked: 2011-01-21 20:33:17.927550 -05:00

Thanks,

Nan

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to