I should add that I've added a 'notice' statement for debugging, which 
again shows the correct things when the manifest is applied manually, but 
doesn't seem to be executed (at all) when run through the puppetmaster 

On Wednesday, September 5, 2012 3:19:07 PM UTC+1, renaud wrote:
>
> Thanks John,
>
> The Puppet templating docs recommend referring to DSL variables via Ruby 
>> class variables, so as @master_host and @master_port in your case.  
>> Referring to them via local variables (as your template does) will often 
>> work, but it can fail in interesting ways if your variables happen to have 
>> the same name as in-scope local variables of the Puppet application.  I 
>> think that's what has happened to you.
>>
>
> Indeed I've seen this since posting and started addressing my variables 
> with @.
> This didn't help unfortunately.
>  
>
>>
>> I suspect that the conflicting master_* variables belong to the puppet 
>> master code (makes sense), so it is plausible that they are not in scope 
>> when you apply your class via "puppet apply", whereas they are in scope 
>> when the template is processed by the master in order to service "puppet 
>> agent".
>>
>> ... and I also thought of this, so I prepended "redis_" in front of my 
> variable names. Unfortunately this still didn't help.
> To clarify, my template now looks like this :
>
> <% if @redis_master_host -%>
> slaveof <%= @redis_master_host %> <%= @redis_master_port %>
> <% end -%>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/VGtWq84BqWkJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to