On 2013-09-08 17:13, Rafi wrote:
Because it should be accessed without the @ since it is not a variable from Puppet.<%- @instance_names.each do | instance_name | -%> define host { host_name <%= @instance_name %> alias <%= @instances[@instance_name]['public_ip'] %> address <%= @instances[@instance_name]['private_ip'] %> } <%- end -%>I know I can access @instances and @instance_names within the template, but the template does not appear to find values for the loop variable @instance_name. Why is this?
Try: alias <%= @instances[instance_name]['public_ip'] %> Regards - henrik -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
