I want to check, if a given string is inside an array and if it isn't, I want to execute the code inside. However the in function seems to work with if only, when I use unless I get the following error.
Could not parse for environment production: Syntax error at 'in'; expected '}'
Code looks like this:
$string = 'abc'
$array = ['abc', 'def', 'ghi']
unless $string in $array {
do xxx
}
what is going on? I use Puppet 2.7