1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2024-11-13 21:50:34 +00:00
puppet-fluentd/manifests/source.pp

22 lines
458 B
ObjectPascal
Raw Normal View History

2015-12-01 13:18:06 +00:00
# Configure a fluentd source
#
define fluentd::source (
$ensure = present,
$priority = 10,
$config = {},
) {
# parameter validation
if ! ($ensure in [ 'present', 'absent' ]) {
fail('ensure parameter must be present or absent')
}
validate_integer($priority)
validate_hash($config)
2015-12-01 13:18:06 +00:00
fluentd::config::file { "source-${title}":
ensure => $ensure,
priority => $priority,
content => template( 'fluentd/source.erb'),
}
}