Usage of "schedule"

6 views
Skip to first unread message

mk

unread,
Nov 22, 2009, 1:40:15 AM11/22/09
to Puppet Users
Hello,

I'm newbie for puppet.
I would appreciate someone tells me how to use "shedule".

What I want to do is puppet client( puppetd ) tries to syncronize /etc/
hosts permission as 644, and puppetd tries to check every 3 minutes.
( I know 3 min is so quick, this is just a test of "schedule")

So I wrote manifests/site.pp,

> node default {
> schedule { every3min:
> period => hourly,
> repeat => 20,
> }
>
> file {
> '/etc/hosts':
> owner => 'root',
> group =>'root',
> mode =>'644',
> schedule => every3min,
> }
>}

When puppet server( puppetmasterd ) and puppet clients(puppted) are
rebooted by me, puppetd tries to check permission.
But after that, I try "chmod 755 /etc/hosts" and wait 3 minutes,
nothing happen.

I think I might misunderstand someway.
Does anyone give me a hand?




Thomas Bellman

unread,
Nov 23, 2009, 9:21:42 AM11/23/09
to puppet...@googlegroups.com
mk wrote:

> What I want to do is puppet client( puppetd ) tries to syncronize /etc/
> hosts permission as 644, and puppetd tries to check every 3 minutes.
> ( I know 3 min is so quick, this is just a test of "schedule")
>
> So I wrote manifests/site.pp,
>
>> node default {
>> schedule { every3min:
>> period => hourly,
>> repeat => 20,
>> }

You can only use schedules to make Puppet manage something *less* often
than Puppet's normal run interval. If you only run Puppet every 30 minutes
(which is the default for puppetd), then you can use schedule to do some
expensive things only, for example, every third hour, or once a day, but
every third minute is meaningless, because Puppet itself isn't running
that often.


/Bellman

Christopher Johnston

unread,
Nov 23, 2009, 11:16:42 AM11/23/09
to puppet...@googlegroups.com
I would like to schedule puppet to only run EVERYTHING once a day at a specific time, what would be the best approach to do that?

-Chris


--

You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=.



Scott Smith

unread,
Nov 23, 2009, 1:28:22 PM11/23/09
to puppet...@googlegroups.com
Christopher Johnston wrote:
> I would like to schedule puppet to only run EVERYTHING once a day at a
> specific time, what would be the best approach to do that?
>

Use cron.

-scott

Ohad Levy

unread,
Nov 23, 2009, 9:04:24 PM11/23/09
to puppet...@googlegroups.com
any maybe a combination of --tags for the rest of the time

Reply all
Reply to author
Forward
0 new messages