Puppet Function: rspamd::create_config_file_resources

Defined in:
vendor_modules/rspamd/functions/create_config_file_resources.pp
Function type:
Puppet Language

Summary

create {rspamd::config} resources from a nested hash (e.g. from hiera)

Overview

rspamd::create_config_file_resources(Hash[String, Hash] $configfile_hash, Hash $params = {})Any

Function: rspamd::create_config_file_resources()

Create rspamdrspamd::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

Parameters:

  • configfile_hash (Hash[String, Hash])

    a hash of config file names mapped to config hashes

  • params (Hash) (defaults to: {})

    a hash of params passed to the rspamdrspamd::config resource (:file will be overridden)

Returns:

  • (Any)

See Also:

Author:

  • Bernhard Frauendienst <puppet@nospam.obeliks.de>



21
22
23
24
25
26
27
28
# File 'vendor_modules/rspamd/functions/create_config_file_resources.pp', line 21

function rspamd::create_config_file_resources(Hash[String, Hash] $configfile_hash, Hash $params = {}) {
  $configfile_hash.each |$key, $value| {
    $file_params = {
      file => $key
    } + $params
    rspamd::create_config_resources($value, $file_params)
  }
}