]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 3rdparty/modules/keystone/manifests/policy.pp
add stackforge/keystone to 3rdparty
[dsa-puppet.git] / 3rdparty / modules / keystone / manifests / policy.pp
diff --git a/3rdparty/modules/keystone/manifests/policy.pp b/3rdparty/modules/keystone/manifests/policy.pp
new file mode 100644 (file)
index 0000000..13be064
--- /dev/null
@@ -0,0 +1,39 @@
+# == Class: keystone::policy
+#
+# Configure the keystone policies
+#
+# === Parameters
+#
+# [*policies*]
+#   (optional) Set of policies to configure for keystone
+#   Example :
+#     {
+#       'keystone-context_is_admin' => {
+#         'key' => 'context_is_admin',
+#         'value' => 'true'
+#       },
+#       'keystone-default' => {
+#         'key' => 'default',
+#         'value' => 'rule:admin_or_owner'
+#       }
+#     }
+#   Defaults to empty hash.
+#
+# [*policy_path*]
+#   (optional) Path to the nova policy.json file
+#   Defaults to /etc/keystone/policy.json
+#
+class keystone::policy (
+  $policies    = {},
+  $policy_path = '/etc/keystone/policy.json',
+) {
+
+  validate_hash($policies)
+
+  Openstacklib::Policy::Base {
+    file_path => $policy_path,
+  }
+
+  create_resources('openstacklib::policy::base', $policies)
+
+}