更新consul-external、consul-internal、mariadb

This commit is contained in:
zhangzhihan
2020-01-24 17:55:06 +08:00
parent 960bdaa91f
commit e78252a137
40 changed files with 41 additions and 2552 deletions

View File

@@ -2,11 +2,11 @@
"server" : true,
"datacenter" : "{{ consul.datacenter }}",
"data_dir" : "/var/consul-cluster",
"encrypt" : "{{ consul.keys}}",
"encrypt" : "{{ consul.dckey }}",
"disable_update_check" : true,
"bootstrap" : true,
"log_file" : "/var/consul-cluster/log/consul_cluster.log",
"retry_join" : ["{{ inventory_hostname }}"],
"retry_join" : ["{{ consul.cluster_ip }}"],
"retry_interval" : "10s"
}

View File

@@ -1,6 +1,4 @@
#!/bin/bash
#BIND_ADDRESS=$(/usr/sbin/ip route | /usr/bin/grep default | head -n 1 | /usr/bin/awk '{print $5}' | /usr/bin/xargs ifconfig | /usr/bin/grep "inet" | /usr/bin/grep -v "inet6" | /usr/bin/awk '{print $2}')
BIND_ADDRESS=$(ifconfig {{ consul.cluster_nig_mgr }} | grep inet | head -1 |awk '{print $2}')
#BIND_ADDRESS=192.168.200.5
BIND_ADDRESS=$(ifconfig {{ consul.cluster_ethname }} | grep inet | head -1 |awk '{print $2}')
systemctl set-environment CONSUL_BIND_ADDRESS=${BIND_ADDRESS}