summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ha
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/ha')
-rw-r--r--deploy/adapters/ansible/roles/ha/tasks/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/ha/templates/haproxy.cfg14
2 files changed, 10 insertions, 6 deletions
diff --git a/deploy/adapters/ansible/roles/ha/tasks/main.yml b/deploy/adapters/ansible/roles/ha/tasks/main.yml
index 668f6847..f60740a3 100644
--- a/deploy/adapters/ansible/roles/ha/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/ha/tasks/main.yml
@@ -6,7 +6,7 @@
with_items: packages | union(packages_noarch)
- name: generate ha service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: install pexpect
diff --git a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
index 0778bb13..7d783a30 100644
--- a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
+++ b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
@@ -169,12 +169,16 @@ listen proxy-ceilometer_api_cluster
listen proxy-dashboarad
bind {{ public_vip.ip }}:80
- option tcpka
- option httpchk
- option tcplog
- balance source
+ mode http
+ balance source
+ capture cookie vgnvisitor= len 32
+ cookie SERVERID insert indirect nocache
+ option forwardfor
+ option httpchk
+ option httpclose
+ rspidel ^Set-cookie:\ IP=
{% for host,ip in haproxy_hosts.items() %}
- server {{ host }} {{ ip }}:80 weight 1 check inter 2000 rise 2 fall 5
+ server {{ host }} {{ ip }}:80 cookie {{ host }} weight 1 check inter 2000 rise 2 fall 5
{% endfor %}
listen stats