mirror of
https://github.com/krislamo/puppet-fluentd
synced 2024-11-14 14:00:36 +00:00
added parameter validation for fluentd::filter
This commit is contained in:
parent
ced0f3ad2b
commit
d24781fcad
@ -6,6 +6,15 @@ define fluentd::filter (
|
|||||||
$pattern = '',
|
$pattern = '',
|
||||||
$config = {},
|
$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}":
|
fluentd::config::file { "filter-${title}":
|
||||||
ensure => $ensure,
|
ensure => $ensure,
|
||||||
priority => $priority,
|
priority => $priority,
|
||||||
|
Loading…
Reference in New Issue
Block a user