puppet-trove/manifests/policy.pp
Tobias Urdin a053d4e86e Convert all class usage to relative names
Change-Id: Ic7b8f4e584e3f1ed1d5c6c568cc6caf67493cdda
2019-12-08 23:24:12 +01:00

47 lines
1001 B
Puppet

# == Class: trove::policy
#
# Configure the trove policies
#
# === Parameters
#
# [*policies*]
# (Optional) Set of policies to configure for trove
# Example :
# {
# 'trove-context_is_admin' => {
# 'key' => 'context_is_admin',
# 'value' => 'true'
# },
# 'trove-default' => {
# 'key' => 'default',
# 'value' => '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',
) {
include trove::deps
include trove::params
validate_legacy(Hash, 'validate_hash', $policies)
Openstacklib::Policy::Base {
file_path => $policy_path,
file_user => 'root',
file_group => $::trove::params::group,
}
create_resources('openstacklib::policy::base', $policies)
oslo::policy { 'trove_config': policy_file => $policy_path }
}