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

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.

[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

[Puppet Users] Re: Creating defined resources based on array of parameters.

2013-05-14 Thread Eugene Brodsky
John, thank you so much for such a detailed and thoughtful response!! I was definitely confused about resource titles' data type, and I think variable scope too. Also I made an incorrect assumption that providing a hash as a resource title will somehow expand its values for use within the decla

[Puppet Users] Creating defined resources based on array of parameters.

2013-05-13 Thread Eugene Brodsky
Hi all, With the goal of making my code a little more DRY, I am trying to define resource parameters in an array of hashes, and then create defined resources from these array items. I am having trouble figuring out the syntax for accessing the hash values for the hash currently being worked on

[Puppet Users] Re: Puppet agent daemon not seeing a Facter fact

2013-02-20 Thread Eugene Brodsky
A bit of an update: I ended up doing something very hackish, but it works. Basically, after installing Puppet, I stop the agent, and add a line to /etc/init.d/puppet to source /etc/environment. Then I start the agent. Works fantastically. I do realize this is a little ugly, but in this case was si

[Puppet Users] Puppet agent daemon not seeing a Facter fact

2013-02-15 Thread Eugene Brodsky
Hi all, first post here... reposting this from Stack Overflow as it didn't get much traction there... I am using puppet to read a fact from facter, and based on that I apply a different configuration to my modules. Problem: the puppet agent isn't seeing this fact. Running puppet agent --test i