1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2024-11-14 14:00:36 +00:00
puppet-fluentd/manifests/filter.pp

24 lines
504 B
ObjectPascal
Raw Normal View History

2015-12-01 13:18:37 +00:00
# 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)
2015-12-01 13:18:37 +00:00
fluentd::config::file { "filter-${title}":
ensure => $ensure,
priority => $priority,
content => template( 'fluentd/filter.erb'),
}
}