diff --git a/manifests/policy.pp b/manifests/policy.pp index f5b4cad3e..91e7e765e 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -49,14 +49,21 @@ class nova::policy ( validate_legacy(Hash, 'validate_hash', $policies) - Openstacklib::Policy::Base { - file_path => $policy_path, - file_user => 'root', - file_group => $::nova::params::group, - file_format => 'yaml', - } + if empty($policies){ + file {$policy_path: + path => $policy_path, + ensure => absent, + } + } else { + Openstacklib::Policy::Base { + file_path => $policy_path, + file_user => 'root', + file_group => $::nova::params::group, + file_format => 'yaml', + } - create_resources('openstacklib::policy::base', $policies) + create_resources('openstacklib::policy::base', $policies) + } oslo::policy { 'nova_config': enforce_scope => $enforce_scope,