diff --git a/consul-ansible/consul.conf b/consul-ansible/consul.conf index d045021..60fa820 100644 --- a/consul-ansible/consul.conf +++ b/consul-ansible/consul.conf @@ -11,9 +11,11 @@ script fi export GOMAXPROCS=`nproc` +BIND_ADDR=`hostname -I | cut -f2 -d' '` exec /usr/local/bin/consul agent \ -config-dir="/etc/consul.d/server" \ + -bind $BIND_ADDR \ ${CONSUL_FLAGS} \ >>/var/log/consul.log 2>&1 -end script \ No newline at end of file +end script