Use defaults in create_resources instead of resource defaults

Resource defaults are bad and leaky, we can avoid needing them in this
case by using the third argument to create_resources() which is a hash
of defaults to apply to resources.

https://docs.puppetlabs.com/references/latest/function.html#createresources

Change-Id: Iefe949b30d1a41e97e602f058d67a38dcb8d66ad
This commit is contained in:
Spencer Krum 2015-11-12 19:09:22 -08:00
parent 35825d6989
commit 5eda0feaea

View File

@ -30,10 +30,8 @@ class nova::policy (
validate_hash($policies)
Openstacklib::Policy::Base {
file_path => $policy_path,
}
$policy_defaults = { 'file_path' => $policy_path }
create_resources('openstacklib::policy::base', $policies)
create_resources('openstacklib::policy::base', $policies, $policy_defaults)
}