1 |
pterjan |
1364 |
class youri-check { |
2 |
pterjan |
1368 |
$location = "/var/www/youri-check" |
3 |
|
|
$vhost = "check.$domain" |
4 |
pterjan |
1364 |
|
5 |
pterjan |
1368 |
class check { |
6 |
|
|
$user = 'youri' |
7 |
|
|
$home = '/var/tmp/youri' |
8 |
|
|
$outdir = "$home/www" |
9 |
|
|
$config = "/etc/youri/cauldron.conf" |
10 |
pterjan |
1364 |
|
11 |
pterjan |
1368 |
user { $user: |
12 |
|
|
comment => "Youri Check", |
13 |
|
|
ensure => present, |
14 |
|
|
managehome => true, |
15 |
|
|
home => $home, |
16 |
|
|
} |
17 |
pterjan |
1364 |
|
18 |
pterjan |
1368 |
package { ['perl-Youri-Media', 'youri-check', 'perl-DBD-SQLite'] : |
19 |
|
|
ensure => installed |
20 |
|
|
} |
21 |
pterjan |
1364 |
|
22 |
pterjan |
1368 |
cron { 'check': |
23 |
|
|
command => "youri-check -c $config test && youri-check -c $config report", |
24 |
|
|
hour => 6, |
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
file { "$config": |
28 |
|
|
ensure => present, |
29 |
|
|
owner => $user, |
30 |
|
|
mode => 640, |
31 |
|
|
content => template("youri-check/check.conf"), |
32 |
|
|
} |
33 |
pterjan |
1364 |
} |
34 |
|
|
|
35 |
pterjan |
1368 |
class website { |
36 |
|
|
file { "$location": |
37 |
|
|
ensure => directory, |
38 |
|
|
owner => apache, |
39 |
|
|
mode => 755 |
40 |
|
|
} |
41 |
|
|
|
42 |
|
|
apache::vhost_simple { $vhost: |
43 |
|
|
location => $location, |
44 |
|
|
} |
45 |
pterjan |
1364 |
} |
46 |
|
|
} |