Defined Type: rsyslog::template::list
- Defined in:
- manifests/template/list.pp
Overview
Add a template list to the rsyslog configuration file.
RSyslog list templates can contain properties and constants. In order to capture this functionality, we have opted for making a hash of these. The Hash will be ordered as given to the content variable.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'manifests/template/list.pp', line 30
define rsyslog::template::list (
Hash[String,String,1] $content
) {
$_safe_name = regsubst($name,'/','__')
$_content = join(map($content) |$key, $value| { "${key}(${value})" }, "\n ")
rsyslog::rule { "05_simp_templates/${_safe_name}.conf":
# lint:ignore:double_quoted_strings lint:ignore:only_variable_string
content => @("EOM")
template(name="${name}" type="list") {
$_content
}
|EOM
# lint:endignore
}
}
|