From 845070a552274060d0c066ae555e9ba7c5a3f028 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Mon, 9 Dec 2013 09:42:48 +0200 Subject: [PATCH] vsroom: Style fixes, defines should not exist inside classes --- vsroom/manifests/init.pp | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/vsroom/manifests/init.pp b/vsroom/manifests/init.pp index fbd462c..2a9258a 100644 --- a/vsroom/manifests/init.pp +++ b/vsroom/manifests/init.pp @@ -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}"], + } + +}