Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Puppet Camptocamp Postfix
Commits
745509f3
Commit
745509f3
authored
Mar 25, 2015
by
Mickaël Canévet
Browse files
Merge pull request #79 from oferzi23/master
fix validation for source and content vars
parents
be33e7ef
9705585e
Changes
1
Show whitespace changes
Inline
Side-by-side
manifests/hash.pp
View file @
745509f3
...
...
@@ -31,8 +31,10 @@ define postfix::hash (
include
::postfix::params
validate_absolute_path
(
$name
)
validate_string
(
$source
)
validate_string
(
$content
)
# validate_string($source)
# validate_string($content)
if
!
is_string
(
$source
)
and
!
is_array
(
$source
)
{
fail
(
"value for source should be either String type or Array type got
${source}
"
)
}
if
!
is_string
(
$content
)
and
!
is_array
(
$content
)
{
fail
(
"value for source should be either String type or Array type got
${content}
"
)
}
validate_string
(
$ensure
)
validate_re
(
$ensure
,
[
'present'
,
'absent'
],
"
\$
ensure must be either 'present' or 'absent', got '
${ensure}
'"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment