db: Use ensure_packages to manage backend package
... instead of skipping the resource definition in case the same is already defined. This allows us to detect any conflicting definitions defined in multiple manifests. Change-Id: Id78c6c1553973b57b4b9e7edaf8d029d833f4722
This commit is contained in:
parent
c3293a4953
commit
d0dd31ee35
|
@ -161,12 +161,12 @@ define oslo::db(
|
|||
default: {}
|
||||
}
|
||||
|
||||
if $backend_package and !defined(Package[$backend_package]) {
|
||||
package { $backend_package:
|
||||
if $backend_package {
|
||||
ensure_packages($backend_package, {
|
||||
ensure => $backend_package_ensure,
|
||||
name => $backend_package,
|
||||
tag => 'openstack',
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ describe 'oslo::db' do
|
|||
|
||||
it 'install the proper backend package' do
|
||||
is_expected.to contain_package(platform_params[:pymysql_package_name]).with(
|
||||
:ensure => 'present',
|
||||
:ensure => 'installed',
|
||||
:name => platform_params[:pymysql_package_name],
|
||||
:tag => 'openstack'
|
||||
)
|
||||
|
@ -176,7 +176,7 @@ describe 'oslo::db' do
|
|||
|
||||
it 'install the proper backend package' do
|
||||
is_expected.to contain_package(platform_params[:pysqlite2_package_name]).with(
|
||||
:ensure => 'present',
|
||||
:ensure => 'installed',
|
||||
:name => platform_params[:pysqlite2_package_name],
|
||||
:tag => 'openstack'
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue