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 --- manifests/nodes.pp | 3 +- modules/youri-check/manifests/init.pp | 58 ++++++++++++++++++++++------------- 2 files changed, 39 insertions(+), 22 deletions(-) diff --git a/manifests/nodes.pp b/manifests/nodes.pp index f402962e..1fbb5c24 100644 --- a/manifests/nodes.pp +++ b/manifests/nodes.pp @@ -104,6 +104,7 @@ node alamut { apache::vhost_simple { "xymon.$domain": location => "/var/lib/xymon/www", } + include youri-check::website } # buildnode @@ -197,7 +198,7 @@ node rabbit { include openssh::ssh_keys_from_ldap include mirror::mirrormageia include releasekey::base - include youri-check + include youri-check::check # for testing iso quickly include libvirtd::kvm 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