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:
parent
8d3c272916
commit
540a50ea46
@ -5,6 +5,14 @@ define fluentd::source (
|
|||||||
$priority = 10,
|
$priority = 10,
|
||||||
$config = {},
|
$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}":
|
fluentd::config::file { "source-${title}":
|
||||||
ensure => $ensure,
|
ensure => $ensure,
|
||||||
priority => $priority,
|
priority => $priority,
|
||||||
|
Loading…
Reference in New Issue
Block a user