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/-/WOa4y3ENoH4J. 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.