It's a group of servers with different interface name.
I read a docs and now, i think to use custom facts and factor utilite, to
get ip
but i can not understand, which directory i must save file with custom fact
вторник, 4 июля 2017 г., 12:21:33 UTC+3 пользователь Александр Подолин
написал:
>
> 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/c4aab676-cf3e-4eb7-91bc-7fdd38c69ae6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.