From b1a0fa6fb2c3bdba45cdf99b786cdfb5b45fb9f0 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Wed, 23 Mar 2011 23:03:01 +0000 Subject: Add an empty website for check --- modules/youri-check/manifests/init.pp | 58 ++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 21 deletions(-) (limited to 'modules') 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, + } } } -- cgit v1.2.1