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:
Takashi Kajinami
2023年07月28日 13:10:57 +09:00
parent c3293a4953
commit d0dd31ee35

View File

@@ -161,12 +161,12 @@ define oslo::db(
default:{}
}
if$backend_packageand!defined(Package[$backend_package]){
package { $backend_package:
if$backend_package{
ensure_packages($backend_package, {
ensure => $backend_package_ensure,
name => $backend_package,
tag => 'openstack',
}
})
}
}

View File

@@ -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'
)
Reference in New Issue
openstack/puppet-oslo
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.