Fix paste file location on Debian
On Debian (and Ubuntu) the paste file is in the /etc/keystone directory, and the default setting is correct. This change will set the paste_deploy config file to absent if we're not on RedHat and no value has been explicitly specified. Closes-Bug: #1410453 Change-Id: I652bc67ff42881fa1cf66c191333b6feaeb27cca
This commit is contained in:
parent
0d9eb94b3e
commit
46369a7966
|
@ -241,7 +241,8 @@
|
|||
# [*paste_config*]
|
||||
# (optional) Name of the paste configuration file that defines the
|
||||
# available pipelines. (string value)
|
||||
# Defaults to '/usr/share/keystone/keystone-dist-paste.ini'
|
||||
# Defaults to '/usr/share/keystone/keystone-dist-paste.ini' on RedHat and
|
||||
# undef on other platforms.
|
||||
#
|
||||
# == Dependencies
|
||||
# None
|
||||
|
@ -335,7 +336,7 @@ class keystone(
|
|||
$validate_insecure = false,
|
||||
$validate_auth_url = false,
|
||||
$validate_cacert = undef,
|
||||
$paste_config = '/usr/share/keystone/keystone-dist-paste.ini',
|
||||
$paste_config = $::keystone::params::paste_config,
|
||||
$service_provider = $::keystone::params::service_provider,
|
||||
$service_name = 'keystone',
|
||||
# DEPRECATED PARAMETERS
|
||||
|
@ -697,8 +698,14 @@ class keystone(
|
|||
}
|
||||
}
|
||||
|
||||
keystone_config {
|
||||
'paste_deploy/config_file': value => $paste_config;
|
||||
if $paste_config {
|
||||
keystone_config {
|
||||
'paste_deploy/config_file': value => $paste_config;
|
||||
}
|
||||
} else {
|
||||
keystone_config {
|
||||
'paste_deploy/config_file': ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ class keystone::params {
|
|||
$service_name = 'keystone'
|
||||
$keystone_wsgi_script_path = '/usr/lib/cgi-bin/keystone'
|
||||
$python_memcache_package_name = 'python-memcache'
|
||||
$paste_config = undef
|
||||
case $::operatingsystem {
|
||||
'Debian': {
|
||||
$service_provider = undef
|
||||
|
@ -31,6 +32,7 @@ class keystone::params {
|
|||
$python_memcache_package_name = 'python-memcached'
|
||||
$service_provider = undef
|
||||
$keystone_wsgi_script_source = '/usr/share/keystone/keystone.wsgi'
|
||||
$paste_config = '/usr/share/keystone/keystone-dist-paste.ini'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ describe 'keystone' do
|
|||
'rabbit_host' => 'localhost',
|
||||
'rabbit_password' => 'guest',
|
||||
'rabbit_userid' => 'guest',
|
||||
'paste_config' => '/usr/share/keystone/keystone-dist-paste.ini',
|
||||
}
|
||||
|
||||
override_params = {
|
||||
|
@ -697,7 +696,21 @@ describe 'keystone' do
|
|||
end
|
||||
|
||||
describe 'when configuring paste_deploy' do
|
||||
describe 'with default paste config' do
|
||||
describe 'with default paste config on Debian' do
|
||||
let :params do
|
||||
default_params
|
||||
end
|
||||
|
||||
it { should contain_keystone_config('paste_deploy/config_file').with_ensure('absent')}
|
||||
end
|
||||
|
||||
describe 'with default paste config on RedHat' do
|
||||
let :facts do
|
||||
global_facts.merge({
|
||||
:osfamily => 'RedHat',
|
||||
:operatingsystemrelease => '6.0'
|
||||
})
|
||||
end
|
||||
let :params do
|
||||
default_params
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue