1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2024-11-10 04:50:34 +00:00
puppet-fluentd/manifests/filter.pp
Christian Becker 9eea9f2009 migrate from stdlib validation to puppet datatypes
fixes some puppet 4 deprecation warnings caused by stdlib
2018-01-16 16:23:03 +01:00

54 lines
1.0 KiB
Puppet

# Define: fluentd::filter
# ===========================
#
# Configures a 'filter' config file.
#
# Parameters
# ----------
# [*ensure*]
# Default: 'present'
# [*priority*]
# Defines the priority
# Default: '20'
# [*pattern*]
# Defines matching the pattern
# Default: '**'
# [*config*]
# Configuration, which must be a hash
# Default: {}'
#
# Examples
# --------
#
# @example
# ::fluentd::filter { 'test':
# priority => 20,
# pattern => '*.test',
# config => {
# 'type' => 'record_transformer',
# 'record' => {
# 'hostname' => '${hostname}'
# }
# }
# }
#
# Copyright
# ---------
#
# Copyright 2015 wywy, unless otherwise noted.
#
define fluentd::filter (
Enum['present', 'absent'] $ensure = present,
Integer $priority = 20,
String $pattern = '**',
Hash $config = {},
) {
fluentd::config::file { "filter-${title}":
ensure => $ensure,
priority => $priority,
content => template( 'fluentd/filter.erb'),
}
}