diff --git a/modules/rhizo_base/manifests/init.pp b/modules/rhizo_base/manifests/init.pp index 1c492c9..dfccfb0 100644 --- a/modules/rhizo_base/manifests/init.pp +++ b/modules/rhizo_base/manifests/init.pp @@ -90,7 +90,7 @@ class rhizo_base { $ssh_addr = hiera('rhizo::ssh_t_address','127.0.0.1') $ssh_user = hiera('rhizo::ssh_user','') $ssh_p = split($vpn_ip_address, '\.')[3] - $protokol_pub_ip = hiera('rhizo::protokol_pub_ip','') + $proto_pub_ip_regex = hiera('rhizo::proto_pub_ip_regex','^0.0.0.0$') $stats_disk = hiera('rhizo::stats_disk','sda1') $stats_if = hiera('rhizo::stats_if','eth0') diff --git a/modules/rhizo_base/templates/get_ip.sh.erb b/modules/rhizo_base/templates/get_ip.sh.erb index 955cf02..96324e6 100755 --- a/modules/rhizo_base/templates/get_ip.sh.erb +++ b/modules/rhizo_base/templates/get_ip.sh.erb @@ -1,7 +1,7 @@ #!/bin/bash _IP=`curl -s api.ipify.org` echo $_IP > /tmp/my_ip -if [ "$_IP" == "<%= @protokol_pub_ip %>" ] ;then +if [[ $_IP =~ <%= @proto_pub_ip_regex %> ]] ;then _IP=`curl -s 10.0.200.100/ip.sh` echo $_IP >> /tmp/my_ip fi