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

22 lines
458 B
Puppet

# 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)
fluentd::config::file { "source-${title}":
ensure => $ensure,
priority => $priority,
content => template( 'fluentd/source.erb'),
}
}