puppet-keystone/manifests/policy.pp
Mike Dorman ef6ae50263 Add ::keystone::policy class for policy management
Follows the same pattern used in other modules for policy management.

Change-Id: I438e1bcf9b0e893639d3e1b0cca0f4c5738cf15b
2015-01-12 15:16:37 -07:00

40 lines
818 B
Puppet

# == 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)
}