Ruby code in Puppet if statements
I am trying to implement a check in a module that checks for two variables being set and if they are then to fail. SO far I've come up with this:
if !$users.empty? and !$group.empty? {
fail 'You cannot define both a list of users and a group. Choose one.'
}
However this fails with the following error:
Error: Could not parse for environment production: Syntax error at '.'; expected ')'
Is there a way to make this work?