From 7cd37266beea81f613c41260e8921eef956dbb1e Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Tue, 9 Jun 2009 15:15:55 +0200 Subject: introduced a logpath setting for vhosts, use it for gitweb issues --- manifests/vhost.pp | 2 ++ manifests/vhost/gitweb.pp | 7 +++++++ manifests/vhost/template.pp | 6 +++++- 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'manifests') 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, -- cgit v1.2.3