1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2024-11-10 04:50:34 +00:00

added parameter validation for fluentd::source

This commit is contained in:
Max Wilhelm 2015-12-01 15:11:24 +01:00
parent 8d3c272916
commit 540a50ea46

View File

@ -5,6 +5,14 @@ define fluentd::source (
$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,