e2729f0fa8
Trove is adding policy support, since it's not yet released (landing in Newton) this code will not auto-include the policy class as other modules do. That will be done later after all distros support a Trove version with a policy.json file. Change-Id: Iae8f8bf341ae17190676c524444600e660420e46
34 lines
770 B
Puppet
34 lines
770 B
Puppet
# == Class: trove::policy
|
|
#
|
|
# Configure the trove policies
|
|
#
|
|
# === Parameters
|
|
#
|
|
# [*policies*]
|
|
# (optional) Set of policies to configure for trove
|
|
# Example :
|
|
# {
|
|
# 'trove-context_is_admin' => {'context_is_admin' => 'true'},
|
|
# 'trove-default' => {'default' => 'rule:admin_or_owner'}
|
|
# }
|
|
# Defaults to empty hash.
|
|
#
|
|
# [*policy_path*]
|
|
# (optional) Path to the trove policy.json file
|
|
# Defaults to /etc/trove/policy.json
|
|
#
|
|
class trove::policy (
|
|
$policies = {},
|
|
$policy_path = '/etc/trove/policy.json',
|
|
) {
|
|
|
|
validate_hash($policies)
|
|
|
|
Openstacklib::Policy::Base {
|
|
file_path => $policy_path,
|
|
}
|
|
|
|
create_resources('openstacklib::policy::base', $policies)
|
|
oslo::policy { 'trove_config': policy_file => $policy_path }
|
|
}
|