1 |
class youri-check { |
2 |
$location = "/var/www/youri-check" |
3 |
$vhost = "check.$domain" |
4 |
|
5 |
class check { |
6 |
$user = 'youri' |
7 |
$home = '/var/tmp/youri' |
8 |
$outdir = "$home/www" |
9 |
$config = "/etc/youri/cauldron.conf" |
10 |
|
11 |
user { $user: |
12 |
comment => "Youri Check", |
13 |
ensure => present, |
14 |
managehome => true, |
15 |
home => $home, |
16 |
} |
17 |
|
18 |
package { ['perl-Youri-Media', 'youri-check', 'perl-DBD-SQLite'] : |
19 |
ensure => installed |
20 |
} |
21 |
|
22 |
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 |
} |
34 |
|
35 |
class website($vhost="$vhost", $location="$location") { |
36 |
file { "$location": |
37 |
ensure => directory, |
38 |
owner => apache, |
39 |
mode => 755 |
40 |
} |
41 |
|
42 |
apache::vhost_simple { $vhost: |
43 |
location => $location, |
44 |
} |
45 |
} |
46 |
} |