Sorry, ignore my suggestion. That won't work.

> On 26 Nov 2015, at 06:57, Dayton Jones <[email protected]> wrote:
> 
> I'm writing a template to populate a file - easy enough...
> 
> What I want is to to grab the list of interfaces, get the ip assigned to that 
> interface and then do a lookup of the ip to get the dns name.
> 
> I'm able to get the interfaces/ips just fine, but can't figure out how to 
> then pass the IP to the function to do the lookup.  Any help is greatly 
> appreciated...
> 
> =======================
> start ERB
> 
> <% scope.lookupvar('interfaces').split(",").each do |interface| %>
> <% @int_ip = scope.lookupvar('ipaddress_'+interface) %>
> <% @int_name = Resolv.new.getname @int_ip %>
> ...
> <% end %>
> 
> end ERB
> ========================
> 
> @int_ip gets popluated and I can manipulate it as needed, but how do I 
> properly pass it to 'Resolv.new.getname' to set the int_name string?
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/6bf51a8e-eb7f-4bcd-ac77-2451bcbec5ce%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/51F5321E-2ED9-40C0-AB2B-1B26DC639C1B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to