aboutsummaryrefslogtreecommitdiffstats
path: root/modules/youri-check/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/youri-check/manifests/init.pp')
-rw-r--r--modules/youri-check/manifests/init.pp58
1 files changed, 37 insertions, 21 deletions
diff --git a/modules/youri-check/manifests/init.pp b/modules/youri-check/manifests/init.pp
index dd9a80cf..5cb03401 100644
--- a/modules/youri-check/manifests/init.pp
+++ b/modules/youri-check/manifests/init.pp
@@ -1,30 +1,46 @@
class youri-check {
+ $location = "/var/www/youri-check"
+ $vhost = "check.$domain"
- $user = 'youri'
- $home = '/var/tmp/youri'
- $outdir = "$home/www"
- $config = "/etc/youri/cauldron.conf"
+ class check {
+ $user = 'youri'
+ $home = '/var/tmp/youri'
+ $outdir = "$home/www"
+ $config = "/etc/youri/cauldron.conf"
- user { $user:
- comment => "Youri Check",
- ensure => present,
- managehome => true,
- home => $home,
- }
+ user { $user:
+ comment => "Youri Check",
+ ensure => present,
+ managehome => true,
+ home => $home,
+ }
- package { ['perl-Youri-Media', 'youri-check', 'perl-DBD-SQLite'] :
- ensure => installed
- }
+ package { ['perl-Youri-Media', 'youri-check', 'perl-DBD-SQLite'] :
+ ensure => installed
+ }
- cron { 'check':
- command => "youri-check -c $config test && youri-check -c $config report",
- hour => 6,
+ cron { 'check':
+ command => "youri-check -c $config test && youri-check -c $config report",
+ hour => 6,
+ }
+
+ file { "$config":
+ ensure => present,
+ owner => $user,
+ mode => 640,
+ content => template("youri-check/check.conf"),
+ }
}
- file { "$config":
- ensure => present,
- owner => $user,
- mode => 640,
- content => template("youri-check/check.conf"),
+ class website {
+ file { "$location":
+ ensure => directory,
+ owner => apache,
+ mode => 755
+ }
+
+ apache::vhost_simple { $vhost:
+ location => $location,
+ }
}
}