Consolidate python memcache bindings install

Consolidate all the installs of python memcache
bindings to use ensure_package. Right now we are
mixing the usage of ensure_resources on some places
which causes redecalaration issues.

Since the resources need to be identical in order
to not raise redeclaration issues we cannot have
the horizon-package tag on the package.

Change-Id: I0a76cbe45774bbf6871c1803c056bc2f6b3b6c0d
This commit is contained in:
Tobias Urdin 2020-05-27 12:16:59 +02:00
parent 069d4e7f2e
commit 3ec253827c
2 changed files with 5 additions and 4 deletions

View File

@ -621,9 +621,10 @@ class horizon(
validate_legacy(Stdlib::Absolutepath, 'validate_absolute_path', $root_path)
if $manage_memcache_package and $cache_backend =~ /MemcachedCache/ {
ensure_resources('package', { 'python-memcache' =>
{ name => $::horizon::params::memcache_package,
tag => ['openstack', 'horizon-package']}})
ensure_packages('python-memcache', {
name => $::horizon::params::memcache_package,
tag => ['openstack'],
})
}
package { 'horizon':

View File

@ -296,7 +296,7 @@ describe 'horizon' do
it {
is_expected.to contain_package('python-memcache').with(
:tag => ['openstack', 'horizon-package'],
:tag => ['openstack'],
:name => platforms_params[:memcache_package],
)
}