Nate Potter 6a34ff8435 puppet-magnum: Initial commit
This is the initial commit for puppet-magnum.
It has mostly been automatically generated using cookiecutter[1] and
msync[2]

[1] https://github.com/openstack/puppet-openstack-cookiecutter
[2] https://github.com/openstack/puppet-modulesync-configs

Change-Id: Id43f377828837dba70745bbe66b51297e383e602
2015-11-12 15:52:15 +00:00

40 lines
802 B
Puppet

# == Class: magnum::policy
#
# Configure the magnum policies
#
# === Parameters
#
# [*policies*]
# (optional) Set of policies to configure for magnum
# Example :
# {
# 'magnum-context_is_admin' => {
# 'key' => 'context_is_admin',
# 'value' => 'true'
# },
# 'magnum-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/magnum/policy.json
#
class magnum::policy (
$policies = {},
$policy_path = '/etc/magnum/policy.json',
) {
validate_hash($policies)
Openstacklib::Policy::Base {
file_path => $policy_path,
}
create_resources('openstacklib::policy::base', $policies)
}