Puppet Function: dovecot::create_config_file_resources
- Defined in:
- functions/create_config_file_resources.pp
- Function type:
- Puppet Language
Summary
create {dovecot::config} resources from a nested hash (e.g. from hiera)Overview
Function: dovecot::create_config_file_resources()
Create dovecotdovecot::config resources from a nested hash, suitable for conveniently loading values from hiera.
The first level of keys is the config files to be written to, the values being the hierarchical values that will be passed to the create_config_resources function
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'functions/create_config_file_resources.pp', line 22
function dovecot::create_config_file_resources(
Hash[String, Hash] $configfile_hash,
Boolean $include_in_main_config = true,
Hash $params = {}
) {
$configfile_hash.each |$key, $value| {
$file_params = { file => $key } + $params
dovecot::create_config_resources($value, $file_params)
if $include_in_main_config {
dovecot::config { "dovecot.conf !include ${key} ${value}":
key => '!include',
value => "conf.d/${key}.conf",
}
}
}
}
|