fix2 多lb节点配置文件格式错误 Issue #286

pull/294/head
gjmzj 2018-08-14 20:01:33 +08:00
parent 0fb1f7ddf3
commit ced4f34aae
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
# 区分多个instance的VRRP组播同网段不能重复取值在0-255之间 # 区分多个instance的VRRP组播同网段不能重复取值在0-255之间
# 可以直接指定数字如ROUTER_ID: 111 # 可以直接指定数字如ROUTER_ID: 111
# 取100~200间的随机数 # 取100~200间的随机数
#ROUTER_ID: "{{ 200 | random }}" #ROUTER_ID: "{{ 200 | random(100, 1) }}"
ROUTER_ID: 111 ROUTER_ID: 111
# haproxy负载均衡算法常见如下 # haproxy负载均衡算法常见如下

View File

@ -4,7 +4,7 @@ global_defs {
vrrp_instance VI-kube-master { vrrp_instance VI-kube-master {
state BACKUP state BACKUP
priority 110 priority {{ 110 | random(1, 1) }}
unicast_src_ip {{ inventory_hostname }} unicast_src_ip {{ inventory_hostname }}
unicast_peer { unicast_peer {
{% for h in groups['lb'] %}{% if h != inventory_hostname %} {% for h in groups['lb'] %}{% if h != inventory_hostname %}