1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2024-09-19 20:20:35 +00:00
puppet-fluentd/manifests/match.pp
2015-12-01 15:11:19 +01:00

24 lines
500 B
Puppet

# Configure a fluentd match
#
define fluentd::match (
$ensure = present,
$priority = 30,
$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 { "match-${title}":
ensure => $ensure,
priority => $priority,
content => template( 'fluentd/match.erb'),
}
}