Skip to content

Commit

Permalink
bugfix:取消lb组变量设置
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgao1983 committed Jun 9, 2018
1 parent 82badc4 commit 9f17296
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion roles/lb/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 区分多个instance的VRRP组播,同网段不能重复,取值在0-255之间
# 可以直接指定数字,如ROUTER_ID=59
# 本项目取100~200间的随机数
ROUTER_ID: {{ 200 | random(100,1) }}
ROUTER_ID: "{{ 200 | random(100,1) }}"
4 changes: 2 additions & 2 deletions roles/lb/templates/haproxy.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ listen kube-master
mode tcp
option tcplog
balance source
{% for host in groups.kube-master %}
{% for host in groups['kube-master'] %}
server {{host.inventory_hostname}} {{host.inventory_hostname}}:6443 check inter 2000 fall 2 rise 2 weight 1
{% endfor %}
{% for host in groups.new-master %}
{% for host in groups['new-master'] %}
server {{host.inventory_hostname}} {{host.inventory_hostname}}:6443 check inter 2000 fall 2 rise 2 weight 1
{% endfor %}

0 comments on commit 9f17296

Please sign in to comment.