[Puppet Users] Re: Templates if/else

2008-10-16 Thread Andrew Shafer
I think your original snippet doesn't work because the first if is inside an <%= %> block. So the rest of the code probably doesn't parse right. On Thu, Oct 16, 2008 at 2:20 PM, Gary Richardson <[EMAIL PROTECTED]>wrote: > Thanks, that got it going for me. I don't know if there was a typo in my >

[Puppet Users] Re: Templates if/else

2008-10-16 Thread Gary Richardson
Thanks, that got it going for me. I don't know if there was a typo in my block of code, but it didn't work for the first time around. On Wed, Oct 15, 2008 at 6:05 PM, Andrew Shafer <[EMAIL PROTECTED]>wrote: > > Gary, > > The templates are using standard ERB, which essentially gives you the > abil

[Puppet Users] Re: Templates if/else

2008-10-15 Thread Andrew Shafer
Gary, The templates are using standard ERB, which essentially gives you the ability to do arbitrary conditional logic using ruby. Anything between <% %> is logic code and <%= %> is evaluated and printed. <% if condition %> <%= print_this %> <% else %> default <% end %> Play with ERB, it is very