dca9fe942b
Previously the anchors and dependencies that allow external hooks were all in the main ::heat class. However, if you wanted to include just ::heat::db::mysql, then it would fail, since it assumed the main heat class was included. This moves all of those resources and relationships into a new class, ::heat::deps. All of the classes will now include this class so that the anchors and deps are always evaluated even if only a portion of the classes are used, and even if ::heat isn't pulled in. Change-Id: I4297df160a7afae2b66c1ac76e37de313fa4fb09 Closes-Bug: #1507934
40 lines
850 B
Puppet
40 lines
850 B
Puppet
# == Class: heat::policy
|
|
#
|
|
# Configure the heat policies
|
|
#
|
|
# == Parameters
|
|
#
|
|
# [*policies*]
|
|
# (optional) Set of policies to configure for heat.
|
|
# Defaults to empty hash.
|
|
#
|
|
# Example:
|
|
# {
|
|
# 'heat-context_is_admin' => {'context_is_admin' => 'true'},
|
|
# 'heat-default' => {'default' => 'rule:admin_or_owner'}
|
|
# }
|
|
#
|
|
# [*policy_path*]
|
|
# (optional) Path to the heat policy.json file.
|
|
# Defaults to '/etc/heat/policy.json'.
|
|
#
|
|
class heat::policy (
|
|
$policies = {},
|
|
$policy_path = '/etc/heat/policy.json',
|
|
) {
|
|
|
|
include ::heat::deps
|
|
|
|
validate_hash($policies)
|
|
|
|
Openstacklib::Policy::Base {
|
|
file_path => $policy_path,
|
|
}
|
|
|
|
create_resources('openstacklib::policy::base', $policies)
|
|
|
|
Anchor<| title == 'heat::config::start' |>
|
|
-> Class['heat::policy']
|
|
~> Anchor<| title == 'heat::config::end' |>
|
|
}
|