summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/vhost.pp2
-rw-r--r--manifests/vhost/gitweb.pp7
-rw-r--r--manifests/vhost/template.pp6
3 files changed, 14 insertions, 1 deletions
diff --git a/manifests/vhost.pp b/manifests/vhost.pp
index f1b010b..f50ff33 100644
--- a/manifests/vhost.pp
+++ b/manifests/vhost.pp
@@ -8,6 +8,7 @@ define apache::vhost(
$ensure = present,
$path = 'absent',
$path_is_webdir = false,
+ $logpath = 'absent',
$template_mode = 'static',
$vhost_mode = 'template',
$vhost_source = 'absent',
@@ -53,6 +54,7 @@ define apache::vhost(
ensure => $ensure,
path => $path,
path_is_webdir => $path_is_webdir,
+ logpath => $logpath,
domain => $domain,
domainalias => $domainalias,
server_admin => $server_admin,
diff --git a/manifests/vhost/gitweb.pp b/manifests/vhost/gitweb.pp
index ee9924a..f875490 100644
--- a/manifests/vhost/gitweb.pp
+++ b/manifests/vhost/gitweb.pp
@@ -22,6 +22,13 @@ define apache::vhost::gitweb(
ensure => $ensure,
path => '/var/www/git',
path_is_webdir => true,
+ logpath => $operatingsystem ? {
+ centos => '/var/log/httpd',
+ fedora => '/var/log/httpd',
+ redhat => '/var/log/httpd',
+ openbsd => '/var/www/logs',
+ default => '/var/log/apache2'
+ },
template_mode => 'gitweb',
domain => $domain,
domainalias => $domainalias,
diff --git a/manifests/vhost/template.pp b/manifests/vhost/template.pp
index ccc4538..228ec9d 100644
--- a/manifests/vhost/template.pp
+++ b/manifests/vhost/template.pp
@@ -18,6 +18,7 @@ define apache::vhost::template(
$ensure = present,
$path = 'absent',
$path_is_webdir = false,
+ $logpath = 'absent',
$domain = 'absent',
$domainalias = 'absent',
$server_admin = 'absent',
@@ -54,7 +55,10 @@ define apache::vhost::template(
} else {
$documentroot = "$real_path/www"
}
- $logdir = "$real_path/logs"
+ $logdir = $logpath ? {
+ 'absent' => "$real_path/logs",
+ default => $logpath
+ }
$servername = $domain ? {
'absent' => $name,