Skip to content
Snippets Groups Projects
Commit 9705585e authored by ofer's avatar ofer
Browse files

fix validation for source and content vars

parent 1f688a01
No related branches found
No related tags found
No related merge requests found
...@@ -31,8 +31,10 @@ define postfix::hash ( ...@@ -31,8 +31,10 @@ define postfix::hash (
include ::postfix::params include ::postfix::params
validate_absolute_path($name) validate_absolute_path($name)
validate_string($source) # validate_string($source)
validate_string($content) # 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_string($ensure)
validate_re($ensure, ['present', 'absent'], validate_re($ensure, ['present', 'absent'],
"\$ensure must be either 'present' or 'absent', got '${ensure}'") "\$ensure must be either 'present' or 'absent', got '${ensure}'")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment