/[adm]/puppet/modules/youri-check/manifests/init.pp
ViewVC logotype

Annotation of /puppet/modules/youri-check/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1447 - (hide annotations) (download)
Sat Apr 2 12:22:27 2011 UTC (11 years, 4 months ago) by pterjan
File size: 1637 byte(s)
Store youri-check results in pgsql, and generate the reports from there on alamut
1 pterjan 1364 class youri-check {
2 pterjan 1447 class base {
3 misc 1371 $vhost = "check.$domain"
4 pterjan 1447 $user = 'youri'
5     $config = '/etc/youri/cauldron.conf'
6     $outdir = '/var/www/youri-check'
7     $home = '/var/tmp/youri'
8 pterjan 1364
9 pterjan 1447 user { $user:
10     comment => 'Youri Check',
11     ensure => present,
12     managehome => true,
13     home => $home,
14     }
15 pterjan 1364
16 pterjan 1447 $pgsql_server = "$vhost"
17     $pgsql_db = 'youri_check'
18     $pgsql_user = 'youri'
19     $pgsql_password = extlookup('youri_pgsql','x')
20     postgresql::remote_user { $pgsql_user:
21     password => $pgsql_password,
22 pterjan 1368 }
23 pterjan 1364
24 pterjan 1447 }
25    
26     class check inherits base {
27     package { ['perl-Youri-Media', 'youri-check', 'perl-DBD-Pg'] :
28 pterjan 1368 ensure => installed
29 pterjan 1447 }
30 pterjan 1364
31 pterjan 1447 cron { 'check':
32     command => "youri-check -c $config test",
33     hour => [0, 6, 12, 18]
34     minute => 4
35     user => "$user",
36     }
37 pterjan 1368
38 pterjan 1447 file { "$config":
39     ensure => present,
40     owner => $user,
41     mode => 640,
42     content => template("youri-check/check.conf"),
43     }
44 pterjan 1364 }
45    
46 pterjan 1447 class report inherits base {
47     file { "$outdir":
48     ensure => directory,
49 pterjan 1368 owner => apache,
50 pterjan 1447 mode => 755
51     }
52 pterjan 1368
53 pterjan 1447 package { ['youri-check', 'perl-DBD-Pg'] :
54     ensure => installed
55     }
56    
57     cron { 'check':
58     command => "youri-check -c $config report",
59     hour => [1, 7, 13, 19]
60     user => "$user",
61     }
62    
63 pterjan 1368 apache::vhost_simple { $vhost:
64 pterjan 1447 location => $outdir,
65 pterjan 1368 }
66 pterjan 1364 }
67     }

  ViewVC Help
Powered by ViewVC 1.1.28