Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions manifests/source.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
#
# Here you should define a list of variables that this module would require.
#
#
# [*ensure*]
# String. Controls if the managed resources shall be <tt>present</tt> or
# <tt>absent</tt>
# Defaults to <tt>present</tt>.
#
# [*priority*]
# Integer. Prefix to the filename to enforce sequential ordering of matches
# Default: 10
Expand All @@ -34,12 +40,17 @@
#
#
define fluentd::source (
$ensure = 'present',
$priority = 10,
$type = undef,
$type_config = undef,
$config = undef
){

if ! ($ensure in [ 'present', 'absent' ]) {
fail("fluentd::source{${name}}: ensure must be a string of 'present' or 'absent' (got ${ensure}")
}

if !is_integer($priority) {
fail("fluentd::source{${name}}: priority must be an integer (got: ${priority})")
}
Expand Down