Fixup validation for Puppet 2.6.8
Anonymous arrays and comparing booleans does not work in 2.6.8 like they do in master. In 2.6.8 we cannot compare a true / false variable to a string inside of Ruby without forcing the function argument to be a string.
This commit is contained in:
@@ -17,8 +17,11 @@ class java(
|
||||
$version='1.6.0_25-fcs'
|
||||
) {
|
||||
|
||||
validate_re($jre, [ '^true$', '^false$' ])
|
||||
validate_re($jdk, [ '^true$', '^false$' ])
|
||||
# Cannot pass anonymous arrays to functions in 2.6.8
|
||||
$v_true_false = [ '^true$', '^false$' ]
|
||||
# Must compare string values, not booleans.
|
||||
validate_re("$jre", $v_true_false)
|
||||
validate_re("$jdk", $v_true_false)
|
||||
validate_re($version, '^[._0-9a-zA-Z:-]+$')
|
||||
|
||||
$jre_real = $jre
|
||||
|
||||
Reference in New Issue
Block a user