diff --git a/manifests/filter.pp b/manifests/filter.pp index fa2a719..5a4834e 100644 --- a/manifests/filter.pp +++ b/manifests/filter.pp @@ -6,6 +6,15 @@ define fluentd::filter ( $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 { "filter-${title}": ensure => $ensure, priority => $priority,