From 04454eff80ab21fd966fc98df61d0d92fb47d400 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Tue, 24 May 2011 09:15:58 +0000 Subject: use second variable, as it is not possible to reassign parameter --- modules/apache/manifests/init.pp | 8 ++++++-- modules/apache/templates/vhost_base.conf | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp index cc7e00ff..7ec8826c 100644 --- a/modules/apache/manifests/init.pp +++ b/modules/apache/manifests/init.pp @@ -158,10 +158,14 @@ class apache { } if ! $access_logfile { - $access_logfile = "$httpd_logdir/access_log-$real_vhost" + $real_access_logfile = "$httpd_logdir/access_log-$real_vhost" + } else { + $real_access_logfile = $access_logfile } if ! $error_logfile { - $error_logfile = "$httpd_logdir/error_log-$real_vhost" + $real_error_logfile = "$httpd_logdir/error_log-$real_vhost" + } else { + $real_error_logfile = $error_logfile } if $use_ssl { diff --git a/modules/apache/templates/vhost_base.conf b/modules/apache/templates/vhost_base.conf index 6737ad00..2d89dccc 100644 --- a/modules/apache/templates/vhost_base.conf +++ b/modules/apache/templates/vhost_base.conf @@ -24,8 +24,8 @@ end <%- end -%> DocumentRoot <%= location %> - CustomLog <%= access_logfile %> combined - ErrorLog <%= error_logfile %> + CustomLog <%= real_access_logfile %> combined + ErrorLog <%= real_error_logfile %> <%- if enable_public_html -%> #TODO add the rest -- cgit v1.2.1