diff --git a/manifests/policy.pp b/manifests/policy.pp index 7619c60..79ff427 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -32,11 +32,16 @@ # (Optional) Path to the tacker policy.yaml file # Defaults to /etc/tacker/policy.yaml # +# [*policy_dirs*] +# (Optional) Path to the tacker policy folder +# Defaults to $::os_service_default +# class tacker::policy ( $enforce_scope = $::os_service_default, $enforce_new_defaults = $::os_service_default, $policies = {}, $policy_path = '/etc/tacker/policy.yaml', + $policy_dirs = $::os_service_default, ) { include tacker::deps @@ -56,7 +61,8 @@ class tacker::policy ( oslo::policy { 'tacker_config': enforce_scope => $enforce_scope, enforce_new_defaults => $enforce_new_defaults, - policy_file => $policy_path + policy_file => $policy_path, + policy_dirs => $policy_dirs, } } diff --git a/releasenotes/notes/policy-dirs-6ee9bf5a0f434aad.yaml b/releasenotes/notes/policy-dirs-6ee9bf5a0f434aad.yaml new file mode 100644 index 0000000..17ef622 --- /dev/null +++ b/releasenotes/notes/policy-dirs-6ee9bf5a0f434aad.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + There is now a new policy_dirs parameter in the tacker::policy class, + so one can set a custom path. diff --git a/spec/classes/tacker_policy_spec.rb b/spec/classes/tacker_policy_spec.rb index a006e31..5b1fb47 100644 --- a/spec/classes/tacker_policy_spec.rb +++ b/spec/classes/tacker_policy_spec.rb @@ -7,6 +7,7 @@ describe 'tacker::policy' do :enforce_scope => false, :enforce_new_defaults => false, :policy_path => '/etc/tacker/policy.yaml', + :policy_dirs => '/etc/tacker/policy.d', :policies => { 'context_is_admin' => { 'key' => 'context_is_admin', @@ -28,6 +29,7 @@ describe 'tacker::policy' do :enforce_scope => false, :enforce_new_defaults => false, :policy_file => '/etc/tacker/policy.yaml', + :policy_dirs => '/etc/tacker/policy.d', ) end end