Merge "Allow setting log files for apache vhost"

This commit is contained in:
Jenkins 2017-10-08 16:49:53 +00:00 committed by Gerrit Code Review
commit ffe62a8af6
2 changed files with 26 additions and 0 deletions

View File

@ -70,6 +70,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['mistral']
@ -97,6 +109,9 @@ class mistral::wsgi::apache (
$wsgi_process_display_name = undef,
$threads = 1,
$priority = '10',
$access_log_file = false,
$access_log_format = false,
$error_log_file = undef,
) {
include ::mistral::deps
@ -151,5 +166,8 @@ class mistral::wsgi::apache (
wsgi_script_dir => $::mistral::params::mistral_wsgi_script_path,
wsgi_script_file => 'app',
wsgi_script_source => $::mistral::params::mistral_wsgi_script_source,
access_log_file => $access_log_file,
access_log_format => $access_log_format,
error_log_file => $error_log_file,
}
}

View File

@ -23,6 +23,8 @@ describe 'mistral::wsgi::apache' do
:wsgi_script_dir => platform_params[:wsgi_script_path],
:wsgi_script_file => 'app',
:wsgi_script_source => platform_params[:wsgi_script_source],
:access_log_file => false,
:access_log_format => false,
)}
end
@ -35,6 +37,9 @@ describe 'mistral::wsgi::apache' do
:ssl => false,
:wsgi_process_display_name => 'mistral',
: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('mistral::deps') }
@ -58,6 +63,9 @@ describe 'mistral::wsgi::apache' do
:wsgi_script_dir => platform_params[:wsgi_script_path],
:wsgi_script_file => 'app',
: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