Zacchaeus Puppet Template Syntax

Posted on by
Stick Puppet Template

I have a puppet manifest which uses an erb template. I've written a lot of puppet manifests, I am new to ruby / erb templates. This is the correct syntax according to the documentation, and it works perfectly. <% if foo!= bar%>derp <% else%>herp <% end%>How can I combine the if statement with an 'or' operator? Download Free Liebermann Piccolo Concerto Pdf Download.

Paper Bag Puppet Template

ERB is Ruby 1. ERB simply extracts the Ruby in the tags and the 'inline text' into a mash-up of code and in-line string/output building to yield intermediate Ruby which is then executed. As such, extracting the actual Ruby (as executed by ERB) looks like: if foo!= bar or if slurp!= burp # some inconsequential ERB magic to output 'derp' else # some inconsequential ERB magic to output 'herp' end Now, filling in the non-interesting parts with dummy expressions yields the following. (Ignore that the strings are always truthy-expressions; the problem is a Syntax Error. Nina Zilli Rapidshare Free. ) if 'hello' or if 'world' else end And this yields the expected error message (see ). Prog.rb:3: syntax error, unexpected $end Well. Download Free Resta Accanto A Me Spartito Pdf. It's because there are two if-expressions 2, but only one is closed and the code has been parsed as though grouping parenthesis have been added. If 'hello' or (if 'world' else end) #.