puppet-sahara/manifests/policy.pp
Denis Egorenko 0008bc5f89 Update Sahara for using puppet-oslo
This commit switches using of oslo options to a puppet-oslo module:
* oslo messaging notifications;
* oslo messaging rabbitmq;
* oslo log;
* oslo db;
* oslo policy;

Change-Id: I63754d63f00c01737031b2fc713563681c269a60
2016-04-13 18:03:16 +03:00

42 lines
874 B
Puppet

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