Commit 745509f3 authored by Mickaël Canévet's avatar Mickaël Canévet
Browse files

Merge pull request #79 from oferzi23/master

fix validation for source and content vars
parents be33e7ef 9705585e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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}'")