Hi all.
Can anybody explain me, how to get remote node ip and use it in .erb 
template file, if this node has several ip address.
Example: server has ip 192.168.156.68 and 10.248.41.70. I need to get 
192.168.156.68
In my manifest file i write:

 if $::ipaddress =~ /^192\.168\.\d{1,3}\.\d{1,3}/ {
    notice("ok")
  }
  else {
    warning("don't know what to do with IP address $::ipaddress")
  }

and in template file : ListenAddress <%= @ipaddress %>

In result i got ListenAddress = 10.248.41.70. 
But i need ListenAddress = 192.168.156.68

In puppet docs speaks that $::ipaddress get ip with default gateway.
Can you explain me how to get 192.168.156.68

-- 
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/828de2c6-c34f-4d26-90d1-f7033de43b9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to