mirror of
https://github.com/krislamo/puppet-fluentd
synced 2024-11-09 20:50:34 +00:00
added parameter validation for fluentd::match
This commit is contained in:
parent
d24781fcad
commit
8d3c272916
@ -6,6 +6,15 @@ define fluentd::match (
|
||||
$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 { "match-${title}":
|
||||
ensure => $ensure,
|
||||
priority => $priority,
|
||||
|
Loading…
Reference in New Issue
Block a user