summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2008-11-07 18:55:16 +0000
committermh <mh@immerda.ch>2008-11-07 18:55:16 +0000
commit909e29758907f327bf162f919191d41d9d34d767 (patch)
tree686451360e594d06870788fc7dab050dc70e27fa /manifests
parentcb859392d1086afb0784a73339ca8120ea9d9c9f (diff)
adjust path stuff -> made it easier
Diffstat (limited to 'manifests')
-rw-r--r--manifests/defines.pp35
1 files changed, 15 insertions, 20 deletions
diff --git a/manifests/defines.pp b/manifests/defines.pp
index 3a2844c..044103e 100644
--- a/manifests/defines.pp
+++ b/manifests/defines.pp
@@ -30,16 +30,6 @@ define apache::vhost::static(
$vhost_source = 'absent',
$vhost_destination = 'absent'
){
- $real_path = $path ? {
- 'absent' => $operatingsystem ? {
- openbsd => "/var/www/htdocs/${name}",
- default => "/var/www/${name}"
- },
- default => "${path}"
- }
- $documentroot = "${real_path}/www"
- $logdir = "${real_path}/logs"
-
apache::vhost::webhostdir{$name:
path => $path,
owner => $owner,
@@ -50,6 +40,7 @@ define apache::vhost::static(
}
apache::vhost{"${name}":
+ path => $path,
vhost_mode => $vhost_mode,
source => $vhost_source,
destination => $vhost_destination,
@@ -82,16 +73,6 @@ define apache::vhost::php::standard(
$vhost_source = 'absent',
$vhost_destination = 'absent'
){
- $real_path = $path ? {
- 'absent' => $operatingsystem ? {
- openbsd => "/var/www/htdocs/${name}",
- default => "/var/www/${name}"
- },
- default => "${path}"
- }
- $documentroot = "${real_path}/www"
- $logdir = "${real_path}/logs"
-
apache::vhost::webhostdir{$name:
path => $path,
owner => $owner,
@@ -130,6 +111,7 @@ define apache::vhost::php::standard(
}
apache::vhost{"${name}":
+ path => $path,
template_mode => 'php',
vhost_mode => $vhost_mode,
source => $vhost_source,
@@ -157,6 +139,7 @@ define apache::vhost::php::standard(
# - file: deploy a vhost file (apache::vhost::file will be called directly)
#
define apache::vhost(
+ $path = 'absent',
$template_mode = 'static',
$vhost_mode = 'template',
$source = 'absent',
@@ -181,6 +164,7 @@ define apache::vhost(
}
'template': {
apache::vhost::template{"${name}":
+ path => $path,
domain => $domain,
domainalias => $domainalias,
php_upload_tmp_dir => $php_upload_tmp_dir,
@@ -255,6 +239,7 @@ define apache::vhost::file(
# - true: enable ssl for this vhost
# - force: enable ssl and redirect non-ssl to ssl
define apache::vhost::template(
+ $path = 'absent',
$domain = 'absent',
$domainalias = 'absent',
$allow_override = 'None',
@@ -265,6 +250,16 @@ define apache::vhost::template(
$ssl_mode = 'false',
$mod_security = 'true'
){
+ $real_path = $path ? {
+ 'absent' => $operatingsystem ? {
+ openbsd => "/var/www/htdocs/${name}",
+ default => "/var/www/${name}"
+ },
+ default => "${path}"
+ }
+ $documentroot = "${real_path}/www"
+ $logdir = "${real_path}/logs"
+
$servername = $domain ? {
'absent' => $name,
default => $domain