Hi,

 I have puppet running just for a group of 5 servers. I am planning for 
increase and thus why I am starting now with puppet.

I have only one github puppet module, puppet-timezone, as default for all 
nodes and is currently the only module even set up. This is key for our 
scripts to run.

cat site.pp


> class base {
> class { 'timezone':
>             timezone => 'PST8PDT',
> ensure => present,
> autoupgrade => true,
>         }
> }
> node default {
> include base
> } 


Now I want to create 2 groups, one called cacher and other procacher which 
will contain about 4 or so nodes each. They are identical servers in each 
group.

Now I use this on each node install of puppet:

crontab -l -u root

> # Puppet agent check-in to save resources:
> 0 1 * * * puppet agent --test --onetime


I dont need them to check timezone sync all the time and I can utilize 
system resourses by leaving puppet off only to run cron 1 time per day. 
These are small machines and thus dont need puppet agent going all the time.

Now I want to set up a custom module that will edit a users crontab and 
make sure the two tasks are uncommented out, but this I want to check every 
5 min.

crontab -u user -l

> # ORDERS
> */5 * * * * nice /home/user/other-script.php 
> "/home/user/other-script.log" >> /home/user/other-script.log 
> # BATCH
> */5 * * * * nice /home/user/script.php "/home/user/script.log" >> 
> /home/user/script.log 


So my question/ help needed is 2 parts.

*1st.)* What is the simplest way to create a custom module to check this is 
exactly as is every 5 min, but when I want to it will comment out those two 
scripts and make sure they stay that way till I want them back on?

*2nd.)* (Not as important but would be nice) Is it possible to run this 
module check in crontab -u root every 5 min separate from the default once 
a day check for any other config options/modules I will use in the future, 
including puppet-timezone which is currently only one?

Thanks in advance.

Tony

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to