Files
puppet-nova/manifests/policy.pp
Yanis Guenane 572c33e76f policy.json: Allow one to manage them from the puppet module
This commit allow a deployer to manage the policies via this module
It relies on augeas to change only the policy needed. The init takes
a hash of policies and apply them.

Change-Id: I534e76f4f7385e9057aaee0a5ec5d463dc918646
2014-11-10 14:58:01 -05:00

30 lines
662 B
Puppet

# == Class: nova::policy
#
# Configure the nova policies
#
# === Parameters
#
# [*policies*]
# (optional) Set of policies to configure for nova
# Example : { 'nova-context_is_admin' => {'context_is_admin' => 'true'}, 'nova-default' => {'default' => 'rule:admin_or_owner'} }
# Defaults to empty hash.
#
# [*policy_path*]
# (optional) Path to the nova policy.json file
# Defaults to /etc/nova/policy.json
#
class nova::policy (
$policies = {},
$policy_path = '/etc/nova/policy.json',
) {
validate_hash($policies)
Openstacklib::Policy::Base {
file_path => $policy_path,
}
create_resources('openstacklib::policy::base', $policies)
}