Add per module policy service refresh

Updating the policies for this project should only
refresh the services that reads it.

Change-Id: I4733a5d445621ff1cb270fa3be3811b531b9a7b8
(cherry picked from commit 160b0b18d1)
(cherry picked from commit b5c621fbea)
This commit is contained in:
Tobias Urdin 2023-06-26 00:00:11 +02:00
parent 1a2fb7e1a7
commit 0560f486d9
3 changed files with 4 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class trove::deps {
# policy config should occur in the config block also as soon as
# puppet-trove supports it. Leave commented out for now.
Anchor['trove::config::begin']
-> Openstacklib::Policy<||>
-> Openstacklib::Policy<| tag == 'trove' |>
~> Anchor['trove::config::end']
# all db settings should be applied and all packages should be installed

View File

@ -62,6 +62,7 @@ class trove::policy (
file_group => $::trove::params::group,
file_format => 'yaml',
purge_config => $purge_config,
tag => 'trove',
}
create_resources('openstacklib::policy', { $policy_path => $policy_parameters })

View File

@ -32,6 +32,7 @@ describe 'trove::policy' do
:file_group => 'trove',
:file_format => 'yaml',
:purge_config => false,
:tag => 'trove',
)
is_expected.to contain_oslo__policy('trove_config').with(
:enforce_scope => false,
@ -61,6 +62,7 @@ describe 'trove::policy' do
:file_group => 'trove',
:file_format => 'yaml',
:purge_config => true,
:tag => 'trove',
)
is_expected.to contain_oslo__policy('trove_config').with(
:enforce_scope => false,