Merge "Allow setting log files for apache vhost"

This commit is contained in:
Jenkins 2017-10-10 07:29:03 +00:00 committed by Gerrit Code Review
commit 02051879b1
2 changed files with 26 additions and 0 deletions

View File

@ -66,6 +66,18 @@
# apache::vhost ssl parameters.
# Optional. Default to apache::vhost 'ssl_*' defaults.
#
# [*access_log_file*]
# The log file name for the virtualhost.
# Optional. Defaults to false.
#
# [*access_log_format*]
# The log format for the virtualhost.
# Optional. Defaults to false.
#
# [*error_log_file*]
# The error log file name for the virtualhost.
# Optional. Defaults to undef.
#
# == Dependencies
#
# requires Class['apache'] & Class['zaqar']
@ -93,6 +105,9 @@ class zaqar::wsgi::apache (
$wsgi_process_display_name = undef,
$threads = $::os_workers,
$priority = '10',
$access_log_file = false,
$access_log_format = false,
$error_log_file = undef,
) {
include ::zaqar::deps
@ -129,5 +144,8 @@ class zaqar::wsgi::apache (
wsgi_script_source => $::zaqar::params::zaqar_wsgi_script_source,
require => Anchor['zaqar::install::end'],
vhost_custom_fragment => 'WSGICallableObject app',
access_log_file => $access_log_file,
access_log_format => $access_log_format,
error_log_file => $error_log_file,
}
}

View File

@ -22,6 +22,8 @@ describe 'zaqar::wsgi::apache' do
:wsgi_script_dir => platform_params[:wsgi_script_path],
:wsgi_script_file => 'zaqar-server',
:wsgi_script_source => platform_params[:wsgi_script_source],
:access_log_file => false,
:access_log_format => false,
)}
end
@ -34,6 +36,9 @@ describe 'zaqar::wsgi::apache' do
:ssl => false,
:wsgi_process_display_name => 'zaqar-server',
:workers => 37,
:access_log_file => '/var/log/httpd/access_log',
:access_log_format => 'some format',
:error_log_file => '/var/log/httpd/error_log'
}
end
it { is_expected.to contain_class('zaqar::params') }
@ -56,6 +61,9 @@ describe 'zaqar::wsgi::apache' do
:wsgi_script_dir => platform_params[:wsgi_script_path],
:wsgi_script_file => 'zaqar-server',
:wsgi_script_source => platform_params[:wsgi_script_source],
:access_log_file => '/var/log/httpd/access_log',
:access_log_format => 'some format',
:error_log_file => '/var/log/httpd/error_log'
)}
end
end