summaryrefslogtreecommitdiff
path: root/manifests/vhost
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2011-02-22 22:59:40 +0100
committermh <mh@immerda.ch>2011-02-22 22:59:40 +0100
commitf14fd057987b5489228a40444c3a101768c5b6bb (patch)
tree6822b37970897305924f5e11b1d7ee49a90ee9de /manifests/vhost
parentea3ebee7153660f809d7f26224e7282f97029743 (diff)
first way to a unified partial based vhost template
Diffstat (limited to 'manifests/vhost')
-rw-r--r--manifests/vhost/php/standard.pp2
-rw-r--r--manifests/vhost/template.pp6
2 files changed, 7 insertions, 1 deletions
diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp
index 9437046..61992a1 100644
--- a/manifests/vhost/php/standard.pp
+++ b/manifests/vhost/php/standard.pp
@@ -40,6 +40,7 @@ define apache::vhost::php::standard(
$manage_webdir = true,
$manage_docroot = true,
$template_mode = 'php',
+ $template_partial = 'absent',
$owner = root,
$group = apache,
$documentroot_owner = apache,
@@ -152,6 +153,7 @@ define apache::vhost::php::standard(
ensure => $ensure,
path => $path,
template_mode => $template_mode,
+ template_partial => $template_partial,
vhost_mode => $vhost_mode,
vhost_source => $vhost_source,
vhost_destination => $vhost_destination,
diff --git a/manifests/vhost/template.pp b/manifests/vhost/template.pp
index b0c08f9..303de0e 100644
--- a/manifests/vhost/template.pp
+++ b/manifests/vhost/template.pp
@@ -75,6 +75,7 @@ define apache::vhost::template(
$run_uid = 'absent',
$run_gid = 'absent',
$template_mode = 'static',
+ $template_partial = 'absent',
$ssl_mode = false,
$mod_security = true,
$mod_security_relevantonly = true,
@@ -174,7 +175,10 @@ define apache::vhost::template(
}
if $ensure != 'absent' {
Apache::Vhost::File[$name]{
- content => template("apache/vhosts/$template_mode/$operatingsystem.erb")
+ content => $template_partial ? {
+ 'absent' => template("apache/vhosts/$template_mode/$operatingsystem.erb"),
+ default => template("apache/vhosts/default.erb"),
+ }
}
}
}