From 7c0c3e4d453b4967ddc74b98d322a61a81305a3a Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Thu, 22 Jun 2023 21:14:12 +0200 Subject: [PATCH] Add per module policy service refresh Updating the policies for this project should only refresh the services that reads it. Change-Id: I94e1120013aa6e15bbf3aa48a9c29d9943985440 --- manifests/deps.pp | 2 +- manifests/policy/base.pp | 3 ++- spec/defines/horizon_policy_base_spec.rb | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/manifests/deps.pp b/manifests/deps.pp index 3e8f39a5..beab1d84 100644 --- a/manifests/deps.pp +++ b/manifests/deps.pp @@ -38,7 +38,7 @@ class horizon::deps { # policy config should occur in the config block Anchor['horizon::config::begin'] - -> Openstacklib::Policy<||> + -> Openstacklib::Policy<| tag == 'horizon' |> ~> Anchor['horizon::config::end'] # Installation or config changes will always restart services. diff --git a/manifests/policy/base.pp b/manifests/policy/base.pp index 61d11cae..7af05720 100644 --- a/manifests/policy/base.pp +++ b/manifests/policy/base.pp @@ -52,6 +52,7 @@ define horizon::policy::base( file_group => $::horizon::params::wsgi_group, file_mode => $file_mode, file_format => $file_format, - purge_config => $purge_config + purge_config => $purge_config, + tag => 'horizon', } } diff --git a/spec/defines/horizon_policy_base_spec.rb b/spec/defines/horizon_policy_base_spec.rb index 062ed2df..8280009b 100644 --- a/spec/defines/horizon_policy_base_spec.rb +++ b/spec/defines/horizon_policy_base_spec.rb @@ -25,6 +25,7 @@ eos :file_group => platform_params[:wsgi_group], :file_mode => '0640', :purge_config => false, + :tag => 'horizon', ) end end @@ -53,6 +54,7 @@ eos :file_group => platform_params[:wsgi_group], :file_mode => '0644', :purge_config => true, + :tag => 'horizon', ) end end