Templates are evaluated on the puppetmaster, so <% puts "hello" %> happens entirely on the puppetmaster and substitutes no text.
Any reason why the first one doesn't use (<%=)? I wouldn't expect it to work as you have it. "This tag will execute the code it contains, but will not be replaced by a value." http://docs.puppetlabs.com/guides/templating.html I've heard of some other rules being tightened in the move to puppet 3, maybe this is one of them. On Fri, May 30, 2014 at 12:39:09PM -0700, Eugene Brodsky wrote: > Hi all, > this used to work in Puppet 2.7, but doesn't in 3.4.3: > <% case @environment > when "production" > foo > else > bar > end -%> > this continues to work: > <%= @environment %> (prints the $environment var as expected). > It almost looks like Ruby isn't getting evaluated at all. Even a simple <% > puts "hello" %> returns a blank line... > Any ideas? > Thanks! > > -- > 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 [1]puppet-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > > [2]https://groups.google.com/d/msgid/puppet-users/80d955b9-539d-43ac-96a8-5ece70d58d28%40googlegroups.com. > For more options, visit [3]https://groups.google.com/d/optout. > > References > > Visible links > 1. mailto:puppet-users+unsubscr...@googlegroups.com > 2. > https://groups.google.com/d/msgid/puppet-users/80d955b9-539d-43ac-96a8-5ece70d58d28%40googlegroups.com?utm_medium=email&utm_source=footer > 3. https://groups.google.com/d/optout -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140530202017.GA13849%40iniquitous.heresiarch.ca. For more options, visit https://groups.google.com/d/optout.