[Puppet Users] Re: cronjob every 15 minutes

2009-07-04 Thread Joe McDonagh

Macno wrote:
> You can do something like this
>
> cron  {
>  "getBroadcast":
>  command => "/server/www-production/www.server.de/cli/
> getBroadcastFromFtp.php",
>  user=> root,
>  weekday => 3,
>  minute  => $hostname ? {
> server-vm1 => "15,45",
> server-vm2 => "0,30"
> },
>  hour=> ['8-20'];
> }
>
> On 2 Lug, 09:04, Rupert  wrote:
>   
>> Hello,
>> im trying to create a class that creates a cronjob that is run ever 15
>> minutes on 2 Servers.
>> These jobs should run at 15 and 45 on one server and on 0 and 30 on
>> the other server.
>> When i set a variable to '0,30' puppet complains that its not a valid
>> minute.
>> Is there a different approach in puppet for this?
>>
>> Here is my class:
>>
>> class cronjobs_servers {
>>
>> case $hostname {
>>
>> "server-vm1": {
>> $cronminute="15,45"
>> $cronminute2="0"
>> }
>> "server-vm2": {
>> $cronminute="0,30"
>> $cronminute2="10"
>>
>> }
>>
>> }
>>
>> cron  {
>> "generate_snapshot":
>> command => "/server/www-production/www.server.de/cli/
>> generateSnapshot.php",
>> user=> root,
>> weekday => ['1-5'],
>> minute  => $cronminute2,
>> hour=> 22;
>> }
>> cron  {
>> "getBroadcast":
>> command => "/server/www-production/www.server.de/cli/
>> getBroadcastFromFtp.php",
>> user=> root,
>> weekday => 3,
>> minute  => $cronminute,
>> hour=> ['8-20'];
>> }
>> cron  {
>>  "notifyMissingVideo":
>> command => "/server/www-production/www.server.de/cli/
>> notifyMissingVideo.php",
>> user=> root,
>> weekday => 3,
>> minute  => $cronminute,
>> hour=> ['8-20'];
>> }
>> cron  {
>> "cache_cleanup":
>> command => "nice -n 19 /usr/sbin/tmpwatch -a -d -q 48 /
>> server/www-production/www.server.de/cache",
>> user=> root,
>> minute  => 2,
>> hour=> 0;
>> }
>>
>> }
>>
>> thx a lot
>>
>> .r
>> 
> >
>   
You can also use the '*/15' notation. I use single quotes, not sure if * 
is a meta character, but better safe than sorry.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[Puppet Users] ip alias class?

2009-07-04 Thread Dick Davies

Hi all

I searched around and found there used to be an IP alias type
in puppet, but it was dropped because it only really worked on Redhat-type OSes.

I only need it on Redhat,  :) [ mainly for apache SSL vhosts]; does
anyone know where the code went?

I'd settle for a definition/template based solution; think I have a
good feel for what it should
look like. Does anyone use anything they could recommend?

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



[Puppet Users] Re: ip alias class?

2009-07-04 Thread Scott Smith

Dick Davies wrote:
> Hi all
> 
> I searched around and found there used to be an IP alias type
> in puppet, but it was dropped because it only really worked on Redhat-type 
> OSes.
> 
> I only need it on Redhat,  :) [ mainly for apache SSL vhosts]; does
> anyone know where the code went?
> 

check out my module -

http://github.com/ohlol/puppet-network/tree/master

-scott

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---