diff --git a/templates/redis_cluster/reset_cluster.erb.sh b/templates/redis_cluster/reset_cluster.erb.sh index 634a1ff..dd608f1 100644 --- a/templates/redis_cluster/reset_cluster.erb.sh +++ b/templates/redis_cluster/reset_cluster.erb.sh @@ -5,7 +5,7 @@ redis_password="<%= @redis_password %>" for index in 1 2 3; do cur_host="redis${index}.$(hostname -d)" if [[ "${my_host}" == "${cur_host}" ]]; then - ip="$(hostname -I | awk '{print $1}')" + ip="$(facter networking.ip)" else ip="$(host "${cur_host}" | grep "has address" | awk '{print $NF}')" fi