> >      if $is_virtual == 'true' { 
>
> is_virtual is a fact, all facts are strings so in this case 'true' is 
> exactly 
> what is needed :( 
>

That's helpful, thanks, now I understand why it works in that case and why 
in my case this is what is needed:

   if $managehome == true {

Since the documentation page is talking about conditional statements *in 
general*, and not just with facts. I might suggest that making that clear 
might avoid confusion on the part of people coming to that page looking to 
find how to make conditional comparisons in puppet.  Who would I make that 
suggestion to, or this this the right forum for that?



“If” Statements

*“If” statements* take a 
boolean<http://docs.puppetlabs.com/puppet/2.7/reference/lang_datatypes.html#booleans>
 condition 
and an arbitrary block of Puppet code, and will only execute the block if 
the condition is true.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to