Re: [Puppet Users] Puppet 3.4.3 - Ruby in ERB

2014-06-02 Thread Eugene Brodsky
That was totally it! I removed the @ from @bucket, and now all is well. Thanks a million. -- *Eugene Brodsky *teehan+lax Systems Administrator p. 416.340.8666 x2650 109 Atlantic Avenue, Suite 202 Toronto, ON M6K 1X4 www.teehanlax.com On Mon, Jun 2, 2014 at 10:41 AM, jcbollinger wrote: > > > O

Re: [Puppet Users] Puppet 3.4.3 - Ruby in ERB

2014-06-02 Thread jcbollinger
On Friday, May 30, 2014 5:10:57 PM UTC-5, Mike Delaney wrote: > > bucket and @bucket are two different variables. > > The main change in ERB templates between 2.7 and 3.x was deprecating the > use of non-class variables to pass information from the calling scope into > the template. Perhaps you

Re: [Puppet Users] Puppet 3.4.3 - Ruby in ERB

2014-05-30 Thread Mike Delaney
bucket and @bucket are two different variables. The main change in ERB templates between 2.7 and 3.x was deprecating the use of non-class variables to pass information from the calling scope into the template. Perhaps you got a little over-zealous prepending '@' to variable names while fixing depr

Re: [Puppet Users] Puppet 3.4.3 - Ruby in ERB

2014-05-30 Thread Eugene Brodsky
I should clarify: this is supposed to actually set a value to another variable that's used elsewhere in the template, e.g.: <% case @environment when "production" bucket = "foo.path" else bucket = "bar.path" end -%> rewrite ^/images$ http://s3.amazonaws.com/<%= @bucket %>; etc.

Re: [Puppet Users] Puppet 3.4.3 - Ruby in ERB

2014-05-30 Thread Christopher Wood
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

[Puppet Users] Puppet 3.4.3 - Ruby in ERB

2014-05-30 Thread Eugene Brodsky
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 sim