That is the problem. :-)
If its false/true I need to do stuff like
if $enabled != undef {
class { 'doit': enabled => $enabled } # This here will use true or
false to delete or add files for example
}
But if it's undef I don't even want to include the class.
I'm guessing that if this is not a valid used syntax then I'll have to
do something like:
if $enabled == true or $enabled == false {
}
But If its supported/valid then better.
Thank you.
On Apr 28, 12:52 pm, Pietro Monteiro <[email protected]>
wrote:
> On 04/28/2011 12:46 PM, Roberto Bouza wrote:
>
> > if $enabled != undef {
> > do it
> > }
>
> > $enabled will have true or false or nothing/undef and it will be used
> > for multiple things but I don't want to do anything if it is 'undef'.
>
> try:
>
> if $enabled {
> do it
>
> }
>
> if $enabled is false or undef then it won't do it.
>
> --
> Pietro Monteiro
> Senior Developer
> DECK Monitoring
> 115 W 8th Ave. Eugene, Oregon 97401
> Office: 541-343-0110www.deckmonitoring.com
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.