diff --git a/manifests/params.pp b/manifests/params.pp index 68edd4e..4a28bbe 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -8,6 +8,7 @@ class mistral::params { $client_package = 'python-mistralclient' $db_sync_command = 'mistral-db-manage --config-file=/etc/mistral/mistral.conf upgrade head' $db_populate_command = 'mistral-db-manage --config-file=/etc/mistral/mistral.conf populate' + $group = 'mistral' case $::osfamily { 'RedHat': { diff --git a/manifests/policy.pp b/manifests/policy.pp index 9e7e1ba..52ff0b7 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -29,11 +29,14 @@ class mistral::policy ( ) { include ::mistral::deps + include ::mistral::params validate_hash($policies) Openstacklib::Policy::Base { - file_path => $policy_path, + file_path => $policy_path, + file_user => 'root', + file_group => $::mistral::params::group, } create_resources('openstacklib::policy::base', $policies) diff --git a/spec/classes/mistral_policy_spec.rb b/spec/classes/mistral_policy_spec.rb index 889c4ad..40e3802 100644 --- a/spec/classes/mistral_policy_spec.rb +++ b/spec/classes/mistral_policy_spec.rb @@ -17,8 +17,10 @@ describe 'mistral::policy' do it 'set up the policies' do is_expected.to contain_openstacklib__policy__base('context_is_admin').with({ - :key => 'context_is_admin', - :value => 'foo:bar' + :key => 'context_is_admin', + :value => 'foo:bar', + :file_user => 'root', + :file_group => 'mistral', }) is_expected.to contain_oslo__policy('mistral_config').with( :policy_file => '/etc/mistral/policy.json', @@ -37,5 +39,4 @@ describe 'mistral::policy' do it_configures 'mistral policies' end end - end