vsroom: Style fixes, defines should not exist inside classes

This commit is contained in:
Ossi Salmi 2013-12-09 09:42:48 +02:00
parent 7bf1bfb06a
commit 845070a552

View file

@ -11,9 +11,11 @@
# $webhosts:
# List of vsroom virtual hosts
#
class vsroom($authurl="/collab/?action=authcredentials",
$boshurl="/bosh/",
$webhosts=undef) {
class vsroom(
$authurl="/collab/?action=authcredentials",
$boshurl="/bosh/",
$webhosts=undef
) {
if !$vsroom_package {
if $vsroom_package_latest {
@ -62,23 +64,28 @@ class vsroom($authurl="/collab/?action=authcredentials",
require => Python::Setup::Install["/usr/local/src/vsroom"],
}
define configwebhost($htdocs) {
file { "/srv/www/https/${name}/vsroom":
ensure => link,
target => $htdocs,
require => File["/srv/www/https/${name}"],
}
}
if $webhosts {
apache::configfile { "vsroom.conf":
http => false,
source => "puppet:///modules/vsroom/vsroom-httpd.conf",
}
configwebhost { $webhosts:
vsroom::configwebhost { $webhosts:
htdocs => $htdocs,
}
}
}
# Enable vsroom for virtual host.
#
define vsroom::configwebhost($htdocs) {
file { "/srv/www/https/${name}/vsroom":
ensure => link,
target => $htdocs,
require => File["/srv/www/https/${name}"],
}
}