1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2024-11-10 04:50:34 +00:00
puppet-fluentd/manifests/filter.pp
2015-12-01 15:11:05 +01:00

24 lines
504 B
Puppet

# Configure a fluentd filter
#
define fluentd::filter (
$ensure = present,
$priority = 20,
$pattern = '',
$config = {},
) {
# parameter validation
if ! ($ensure in [ 'present', 'absent' ]) {
fail('ensure parameter must be present or absent')
}
validate_integer($priority)
validate_string($pattern)
validate_hash($config)
fluentd::config::file { "filter-${title}":
ensure => $ensure,
priority => $priority,
content => template( 'fluentd/filter.erb'),
}
}