Make admin and public scripts configurable
When we switched to using the package provided wsgi scripts for keystone, we lost the ability to override these scripts. This change updates the apache::wsgi::apache class to actually allow for the overriding of the admin and public wsgi scripts. Change-Id: I683f1ef95700d9382d480a1daca41cf9ed5ccd26
This commit is contained in:
parent
b9e01a1618
commit
e6c53594f3
@ -178,18 +178,17 @@ class keystone::wsgi::apache (
|
||||
$wsgi_application_group = '%{GLOBAL}',
|
||||
$wsgi_pass_authorization = 'On',
|
||||
$wsgi_chunked_request = undef,
|
||||
$wsgi_admin_script_source = undef,
|
||||
$wsgi_public_script_source = undef,
|
||||
$wsgi_admin_script_source = $::keystone::params::keystone_wsgi_admin_script_path,
|
||||
$wsgi_public_script_source = $::keystone::params::keystone_wsgi_public_script_path,
|
||||
$wsgi_script_ensure = undef,
|
||||
$access_log_format = false,
|
||||
$headers = undef,
|
||||
$vhost_custom_fragment = undef,
|
||||
#DEPRECATED
|
||||
$wsgi_script_source = undef,
|
||||
) {
|
||||
) inherits ::keystone::params {
|
||||
|
||||
include ::keystone::deps
|
||||
include ::keystone::params
|
||||
include ::apache
|
||||
include ::apache::mod::wsgi
|
||||
if $ssl {
|
||||
@ -258,8 +257,8 @@ class keystone::wsgi::apache (
|
||||
$wsgi_admin_source = $wsgi_script_source
|
||||
$wsgi_public_source = $wsgi_script_source
|
||||
} else {
|
||||
$wsgi_admin_source = $::keystone::params::keystone_wsgi_admin_script_path
|
||||
$wsgi_public_source = $::keystone::params::keystone_wsgi_public_script_path
|
||||
$wsgi_admin_source = $wsgi_admin_script_source
|
||||
$wsgi_public_source = $wsgi_public_script_source
|
||||
}
|
||||
|
||||
$wsgi_files = {
|
||||
|
4
releasenotes/notes/fix-wsgi-params-366be2d75d6792c8.yaml
Normal file
4
releasenotes/notes/fix-wsgi-params-366be2d75d6792c8.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- Fixed the keystone::wsgi::apache parameters for supplying
|
||||
custom admin and public wsgi scripts.
|
@ -325,6 +325,47 @@ describe 'keystone::wsgi::apache' do
|
||||
'headers' => 'set X-Frame-Options "DENY"'
|
||||
)}
|
||||
end
|
||||
|
||||
describe 'when overriding script paths with link' do
|
||||
let :params do
|
||||
{
|
||||
:wsgi_file_target => 'link',
|
||||
:wsgi_admin_script_source => '/home/foo/admin-script',
|
||||
:wsgi_public_script_source => '/home/foo/public-script',
|
||||
}
|
||||
end
|
||||
|
||||
it 'should contain correct files' do
|
||||
is_expected.to contain_file('keystone_wsgi_admin').with(
|
||||
'path' => "#{facts[:wsgi_script_path]}/keystone-admin",
|
||||
'target' => params[:wsgi_admin_script_source]
|
||||
)
|
||||
is_expected.to contain_file('keystone_wsgi_main').with(
|
||||
'path' => "#{facts[:wsgi_script_path]}/keystone-public",
|
||||
'target' => params[:wsgi_public_script_source]
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'when overriding script paths with source' do
|
||||
let :params do
|
||||
{
|
||||
:wsgi_admin_script_source => '/home/foo/admin-script',
|
||||
:wsgi_public_script_source => '/home/foo/public-script',
|
||||
}
|
||||
end
|
||||
|
||||
it 'should contain correct files' do
|
||||
is_expected.to contain_file('keystone_wsgi_admin').with(
|
||||
'path' => "#{facts[:wsgi_script_path]}/keystone-admin",
|
||||
'source' => params[:wsgi_admin_script_source]
|
||||
)
|
||||
is_expected.to contain_file('keystone_wsgi_main').with(
|
||||
'path' => "#{facts[:wsgi_script_path]}/keystone-public",
|
||||
'source' => params[:wsgi_public_script_source]
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
Loading…
Reference in New Issue
Block a user