vsroom: Style fixes, defines should not exist inside classes
This commit is contained in:
parent
7bf1bfb06a
commit
845070a552
1 changed files with 19 additions and 12 deletions
|
@ -11,9 +11,11 @@
|
||||||
# $webhosts:
|
# $webhosts:
|
||||||
# List of vsroom virtual hosts
|
# List of vsroom virtual hosts
|
||||||
#
|
#
|
||||||
class vsroom($authurl="/collab/?action=authcredentials",
|
class vsroom(
|
||||||
$boshurl="/bosh/",
|
$authurl="/collab/?action=authcredentials",
|
||||||
$webhosts=undef) {
|
$boshurl="/bosh/",
|
||||||
|
$webhosts=undef
|
||||||
|
) {
|
||||||
|
|
||||||
if !$vsroom_package {
|
if !$vsroom_package {
|
||||||
if $vsroom_package_latest {
|
if $vsroom_package_latest {
|
||||||
|
@ -62,23 +64,28 @@ class vsroom($authurl="/collab/?action=authcredentials",
|
||||||
require => Python::Setup::Install["/usr/local/src/vsroom"],
|
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 {
|
if $webhosts {
|
||||||
apache::configfile { "vsroom.conf":
|
apache::configfile { "vsroom.conf":
|
||||||
http => false,
|
http => false,
|
||||||
source => "puppet:///modules/vsroom/vsroom-httpd.conf",
|
source => "puppet:///modules/vsroom/vsroom-httpd.conf",
|
||||||
}
|
}
|
||||||
|
|
||||||
configwebhost { $webhosts:
|
vsroom::configwebhost { $webhosts:
|
||||||
htdocs => $htdocs,
|
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}"],
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue