diff --git a/puppet-{{cookiecutter.project_name}}/manifests/policy.pp b/puppet-{{cookiecutter.project_name}}/manifests/policy.pp index 221beab..6a62730 100644 --- a/puppet-{{cookiecutter.project_name}}/manifests/policy.pp +++ b/puppet-{{cookiecutter.project_name}}/manifests/policy.pp @@ -32,11 +32,16 @@ # (Optional) Path to the {{cookiecutter.project_name}} policy.yaml file # Defaults to /etc/{{cookiecutter.project_name}}/policy.yaml # +# [*policy_dirs*] +# (Optional) Path to the {{cookiecutter.project_name}} policy folder +# Defaults to $::os_service_default +# class {{cookiecutter.project_name}}::policy ( $enforce_scope = $::os_service_default, $enforce_new_defaults = $::os_service_default, $policies = {}, $policy_path = '/etc/{{cookiecutter.project_name}}/policy.yaml', + $policy_dirs = $::os_service_default, ) { include {{cookiecutter.project_name}}::deps @@ -56,7 +61,8 @@ class {{cookiecutter.project_name}}::policy ( oslo::policy { '{{cookiecutter.project_name}}_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/puppet-{{cookiecutter.project_name}}/spec/classes/{{cookiecutter.project_name}}_policy_spec.rb b/puppet-{{cookiecutter.project_name}}/spec/classes/{{cookiecutter.project_name}}_policy_spec.rb index 3eca0c1..507a44b 100644 --- a/puppet-{{cookiecutter.project_name}}/spec/classes/{{cookiecutter.project_name}}_policy_spec.rb +++ b/puppet-{{cookiecutter.project_name}}/spec/classes/{{cookiecutter.project_name}}_policy_spec.rb @@ -7,6 +7,7 @@ describe '{{cookiecutter.project_name}}::policy' do :enforce_scope => false, :enforce_new_defaults => false, :policy_path => '/etc/{{cookiecutter.project_name}}/policy.yaml', + :policy_dirs => '/etc/{{cookiecutter.project_name}}/policy.d', :policies => { 'context_is_admin' => { 'key' => 'context_is_admin', @@ -28,6 +29,7 @@ describe '{{cookiecutter.project_name}}::policy' do :enforce_scope => false, :enforce_new_defaults => false, :policy_file => '/etc/{{cookiecutter.project_name}}/policy.yaml', + :policy_dirs => '/etc/{{cookiecutter.project_name}}/policy.d', ) end end