Hi folks I''m beginning my forays into puppet templates, and am trying to figure out the template language. Specifically, looking at conditions. I''ve not seen anything that would describe the use of, for example, case, or if/elseif/else types. I saw on puppet''s templating page that "if/else" is usable, but, what about other conditionals? Is there any sort of tutorial to better describe how it works? Thanks! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> I''m beginning my forays into puppet templates, and am trying to figure out > the template language. Specifically, looking at conditions. I''ve not seen > anything that would describe the use of, for example, case, or > if/elseif/else types. > I saw on puppet''s templating page that "if/else" is usable, but, what about > other conditionals? Is there any sort of tutorial to better describe how it > works?puppet uses erb, so look for erb tutorials. cheers pete -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
rjustinwilliams@gmail.com wrote:> I''m beginning my forays into puppet templates, and am trying to figure > out the template language. Specifically, looking at conditions. I''ve not > seen anything that would describe the use of, for example, case, or > if/elseif/else types. > I saw on puppet''s templating page that "if/else" is usable, but, what > about other conditionals? Is there any sort of tutorial to better > describe how it works?The ERB language is Ruby. You can write any kind of Ruby code within <% %>, and any kind of Ruby expression within <%= %> in your templates. So, you need to go read a Ruby book, or some other Ruby documentation, to know everything you can do. /Bellman -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.