]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/keystone/manifests/policy.pp
add stackforge/keystone to 3rdparty
[dsa-puppet.git] / 3rdparty / modules / keystone / manifests / policy.pp
1 # == Class: keystone::policy
2 #
3 # Configure the keystone policies
4 #
5 # === Parameters
6 #
7 # [*policies*]
8 #   (optional) Set of policies to configure for keystone
9 #   Example :
10 #     {
11 #       'keystone-context_is_admin' => {
12 #         'key' => 'context_is_admin',
13 #         'value' => 'true'
14 #       },
15 #       'keystone-default' => {
16 #         'key' => 'default',
17 #         'value' => 'rule:admin_or_owner'
18 #       }
19 #     }
20 #   Defaults to empty hash.
21 #
22 # [*policy_path*]
23 #   (optional) Path to the nova policy.json file
24 #   Defaults to /etc/keystone/policy.json
25 #
26 class keystone::policy (
27   $policies    = {},
28   $policy_path = '/etc/keystone/policy.json',
29 ) {
30
31   validate_hash($policies)
32
33   Openstacklib::Policy::Base {
34     file_path => $policy_path,
35   }
36
37   create_resources('openstacklib::policy::base', $policies)
38
39 }