aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2011-03-23 23:03:01 +0000
committerPascal Terjan <pterjan@mageia.org>2011-03-23 23:03:01 +0000
commitb1a0fa6fb2c3bdba45cdf99b786cdfb5b45fb9f0 (patch)
tree451a77811f119b34ebbf2d11a8719634346098f9
parent90f75e665998af5195088eb00e2a9a4955d4065b (diff)
downloadpuppet-b1a0fa6fb2c3bdba45cdf99b786cdfb5b45fb9f0.tar
puppet-b1a0fa6fb2c3bdba45cdf99b786cdfb5b45fb9f0.tar.gz
puppet-b1a0fa6fb2c3bdba45cdf99b786cdfb5b45fb9f0.tar.bz2
puppet-b1a0fa6fb2c3bdba45cdf99b786cdfb5b45fb9f0.tar.xz
puppet-b1a0fa6fb2c3bdba45cdf99b786cdfb5b45fb9f0.zip
Add an empty website for check
-rw-r--r--manifests/nodes.pp3
-rw-r--r--modules/youri-check/manifests/init.pp58
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,
+ }
}
}