mirror of
https://github.com/krislamo/puppet-fluentd
synced 2024-11-10 04:50:34 +00:00
22 lines
458 B
Puppet
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'),
|
|
}
|
|
}
|