Merge "coordination: disable config management"
This commit is contained in:
commit
1e6b40e31b
|
@ -12,9 +12,14 @@
|
|||
# (Optional) ensure state for package.
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*manage_config*]
|
||||
# (Optional) Whether to manage the configuration parameters.
|
||||
# Defaults to true.
|
||||
#
|
||||
define oslo::coordination (
|
||||
$backend_url = $::os_service_default,
|
||||
$package_ensure = 'present',
|
||||
$manage_config = true,
|
||||
) {
|
||||
|
||||
include oslo::params
|
||||
|
@ -59,8 +64,10 @@ define oslo::coordination (
|
|||
}
|
||||
}
|
||||
|
||||
$coordination_options = {
|
||||
'coordination/backend_url' => { value => $backend_url },
|
||||
if $manage_config {
|
||||
$coordination_options = {
|
||||
'coordination/backend_url' => { value => $backend_url },
|
||||
}
|
||||
create_resources($name, $coordination_options)
|
||||
}
|
||||
create_resources($name, $coordination_options)
|
||||
}
|
||||
|
|
|
@ -85,6 +85,23 @@ describe 'oslo::coordination' do
|
|||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with configuration management disabled' do
|
||||
let :params do
|
||||
{ :backend_url => 'redis://localhost:6379',
|
||||
:manage_config => false }
|
||||
end
|
||||
|
||||
it 'manages only packages' do
|
||||
is_expected.to_not contain_keystone_config('coordination/backend_url')
|
||||
|
||||
is_expected.to contain_package('python-redis').with(
|
||||
:name => platform_params[:python_redis_package_name],
|
||||
:ensure => 'present',
|
||||
:tag => 'openstack',
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
|
Loading…
Reference in New Issue