Puppet Class: tripleo::config
- Defined in:
- manifests/config.pp
Overview
Class: tripleo::config
Configure services with Puppet
Parameters:
- configs
-
(optional) Configuration to inject. Should be an hash. Default to lookup(‘param_config’, {})
- providers
-
(optional) Filter the providers we want to use for config. Should be an array. Default to lookup(‘param_providers’, Array, ‘deep’, [])
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'manifests/config.pp', line 18
class tripleo::config(
$configs = lookup('param_config', {}),
$providers = lookup('param_providers', Array[String], 'deep', []),
) {
if ! empty($configs) {
# Allow composable services to load their own configurations.
# Each service can load its config options by using this form:
#
# puppet_config:
# param_config:
# 'aodh_config':
# DEFAULT:
# foo: fooValue
# bar: barValue
$configs.each |$provider, $sections| {
if empty($providers) or ($provider in $providers) {
$sections.each |$section, $params| {
$params.each |$param, $value| {
create_resources($provider, {"${section}/${param}" => {'value' => $value }})
}
}
}
}
}
}
|