Merge "Allow to path custom fragment to vhost"
This commit is contained in:
@@ -115,30 +115,36 @@
|
|||||||
# (optional) The source of the WSGI script.
|
# (optional) The source of the WSGI script.
|
||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
|
# [*vhost_custom_fragment*]
|
||||||
|
# (optional) Passes a string of custom configuration
|
||||||
|
# directives to be placed at the end of the vhost configuration.
|
||||||
|
# Defaults to undef.
|
||||||
|
#
|
||||||
define openstacklib::wsgi::apache (
|
define openstacklib::wsgi::apache (
|
||||||
$service_name = $name,
|
$service_name = $name,
|
||||||
$bind_host = undef,
|
$bind_host = undef,
|
||||||
$bind_port = undef,
|
$bind_port = undef,
|
||||||
$group = undef,
|
$group = undef,
|
||||||
$path = '/',
|
$path = '/',
|
||||||
$priority = '10',
|
$priority = '10',
|
||||||
$servername = $::fqdn,
|
$servername = $::fqdn,
|
||||||
$ssl = false,
|
$ssl = false,
|
||||||
$ssl_ca = undef,
|
$ssl_ca = undef,
|
||||||
$ssl_cert = undef,
|
$ssl_cert = undef,
|
||||||
$ssl_certs_dir = undef,
|
$ssl_certs_dir = undef,
|
||||||
$ssl_chain = undef,
|
$ssl_chain = undef,
|
||||||
$ssl_crl = undef,
|
$ssl_crl = undef,
|
||||||
$ssl_crl_path = undef,
|
$ssl_crl_path = undef,
|
||||||
$ssl_key = undef,
|
$ssl_key = undef,
|
||||||
$threads = $::processorcount,
|
$threads = $::processorcount,
|
||||||
$user = undef,
|
$user = undef,
|
||||||
$workers = 1,
|
$workers = 1,
|
||||||
$wsgi_daemon_process = $name,
|
$wsgi_daemon_process = $name,
|
||||||
$wsgi_process_group = $name,
|
$wsgi_process_group = $name,
|
||||||
$wsgi_script_dir = undef,
|
$wsgi_script_dir = undef,
|
||||||
$wsgi_script_file = undef,
|
$wsgi_script_file = undef,
|
||||||
$wsgi_script_source = undef,
|
$wsgi_script_source = undef,
|
||||||
|
$vhost_custom_fragment = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::apache
|
include ::apache
|
||||||
@@ -198,6 +204,7 @@ define openstacklib::wsgi::apache (
|
|||||||
wsgi_daemon_process_options => $wsgi_daemon_process_options,
|
wsgi_daemon_process_options => $wsgi_daemon_process_options,
|
||||||
wsgi_process_group => $wsgi_process_group,
|
wsgi_process_group => $wsgi_process_group,
|
||||||
wsgi_script_aliases => $wsgi_script_aliases,
|
wsgi_script_aliases => $wsgi_script_aliases,
|
||||||
|
custom_fragment => $vhost_custom_fragment,
|
||||||
require => File[$service_name],
|
require => File[$service_name],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -86,6 +86,43 @@ describe 'openstacklib::wsgi::apache' do
|
|||||||
it { is_expected.to contain_file("#{platform_parameters[:httpd_ports_file]}") }
|
it { is_expected.to contain_file("#{platform_parameters[:httpd_ports_file]}") }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'when overriding parameters' do
|
||||||
|
let :params do
|
||||||
|
{
|
||||||
|
:wsgi_script_dir => '/var/www/cgi-bin/keystone',
|
||||||
|
:wsgi_script_file => 'main',
|
||||||
|
:wsgi_script_source => '/usr/share/keystone/keystone.wsgi',
|
||||||
|
:servername => 'dummy.host',
|
||||||
|
:bind_host => '10.42.51.1',
|
||||||
|
:bind_port => 4142,
|
||||||
|
:user => 'keystone',
|
||||||
|
:group => 'keystone',
|
||||||
|
:ssl => false,
|
||||||
|
:workers => 37,
|
||||||
|
:vhost_custom_fragment => 'LimitRequestFieldSize 81900'
|
||||||
|
}
|
||||||
|
end
|
||||||
|
it { is_expected.to contain_apache__vhost('keystone_wsgi').with(
|
||||||
|
'servername' => 'dummy.host',
|
||||||
|
'ip' => '10.42.51.1',
|
||||||
|
'port' => '4142',
|
||||||
|
'docroot' => "/var/www/cgi-bin/keystone",
|
||||||
|
'ssl' => 'false',
|
||||||
|
'wsgi_daemon_process' => 'keystone_wsgi',
|
||||||
|
'wsgi_daemon_process_options' => {
|
||||||
|
'user' => 'keystone',
|
||||||
|
'group' => 'keystone',
|
||||||
|
'processes' => '37',
|
||||||
|
'threads' => '42',
|
||||||
|
},
|
||||||
|
'wsgi_process_group' => 'keystone_wsgi',
|
||||||
|
'wsgi_script_aliases' => { '/' => "/var/www/cgi-bin/keystone/main" },
|
||||||
|
'require' => 'File[keystone_wsgi]',
|
||||||
|
'custom_fragment' => 'LimitRequestFieldSize 81900',
|
||||||
|
)}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'on RedHat platforms' do
|
context 'on RedHat platforms' do
|
||||||
|
Reference in New Issue
Block a user