X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fglance%2Fmanifests%2Fpolicy.pp;fp=3rdparty%2Fmodules%2Fglance%2Fmanifests%2Fpolicy.pp;h=bf1d8e45d6167e220d327fd6397789f740ab08e2;hp=0000000000000000000000000000000000000000;hb=4631045ebb77ee8622f6fa09277a50c372bcc02e;hpb=3d4dc4fd9e59bd0e07646c99f6b356c7d9d859aa diff --git a/3rdparty/modules/glance/manifests/policy.pp b/3rdparty/modules/glance/manifests/policy.pp new file mode 100644 index 00000000..bf1d8e45 --- /dev/null +++ b/3rdparty/modules/glance/manifests/policy.pp @@ -0,0 +1,39 @@ +# == Class: glance::policy +# +# Configure the glance policies +# +# === Parameters +# +# [*policies*] +# (optional) Set of policies to configure for glance +# Example : +# { +# 'glance-context_is_admin' => { +# 'key' => 'context_is_admin', +# 'value' => 'true' +# }, +# 'glance-default' => { +# 'key' => 'default', +# 'value' => 'rule:admin_or_owner' +# } +# } +# Defaults to empty hash. +# +# [*policy_path*] +# (optional) Path to the glance policy.json file +# Defaults to /etc/glance/policy.json +# +class glance::policy ( + $policies = {}, + $policy_path = '/etc/glance/policy.json', +) { + + validate_hash($policies) + + Openstacklib::Policy::Base { + file_path => $policy_path, + } + + create_resources('openstacklib::policy::base', $policies) + +}