puppet-ceilometer/manifests/policy.pp
ZhongShengping fc4a0fd510 Add hooks for external install & svc management
This adds defined anchor points for external modules to hook into the
software install, config and service dependency chain.  This allows
external modules to manage software installation (virtualenv,
containers, etc) and service management (pacemaker) without needing rely
on resources that may change or be renamed.

Change-Id: I0d18ec6ffe6b54c85773a6dabb0ed7b6f59a12f4
2016-11-29 17:32:37 +08:00

37 lines
862 B
Puppet

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