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 flexible.
On Wed, Oct 15, 2008 at 6:24 PM, Gary Richardson
<[EMAIL PROTECTED]>wrote:
> Hey,
>
> I'd like to do something like this in my template:
>
> <%= if has_variable?('some_variable') then %><%= some_variable%><% else
> %>default<% end %>
>
> http://reductivelabs.com/trac/puppet/wiki/PuppetTemplating talks about
> conditionals, but not so much about if/else.
>
> Any suggestions?
>
> Thanks!
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---