Matt Fischer a617112364 Mistral external dependency management
Move all dependency tracking to an external class which simplifies the
relationships and allows managing Mistral without necessarily using
packages.

Change-Id: If83638c6cdabc4256cd775d7a0187a5668e4d2c9
2016-12-07 20:37:27 +00:00

44 lines
903 B
Puppet

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