aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/haproxy
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-02-02 21:25:19 +0000
committerGerrit Code Review <review@openstack.org>2016-02-02 21:25:19 +0000
commit572e80e6d081ae1d42998b5a4cb3fcaa9b6b2a48 (patch)
treef80002312009308cbbab3d52384b55ad63d72b48 /ansible/roles/haproxy
parent0e5ca754ace90ac79d5197f0803a3d45f03a0e61 (diff)
parent3ae00639440dd7d3ebfca847e369b475a95aca3d (diff)
downloadkolla-572e80e6d081ae1d42998b5a4cb3fcaa9b6b2a48.tar.gz
kolla-572e80e6d081ae1d42998b5a4cb3fcaa9b6b2a48.zip
Merge "Add an ansible role for mongodb"
Diffstat (limited to 'ansible/roles/haproxy')
-rw-r--r--ansible/roles/haproxy/templates/haproxy.cfg.j28
1 files changed, 8 insertions, 0 deletions
diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2
index fd520d6ed..e8af22ea1 100644
--- a/ansible/roles/haproxy/templates/haproxy.cfg.j2
+++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2
@@ -42,6 +42,14 @@ listen rabbitmq_management
{% endfor %}
{% endif %}
+{% if enable_mongodb | bool %}
+listen mongodb
+ bind {{ kolla_internal_address }}:{{ mongodb_port }}
+{% for host in groups['mongodb'] %}
+ server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ mongodb_port }} check inter 2000 rise 2 fall 5
+{% endfor %}
+{% endif %}
+
{% if enable_keystone | bool %}
listen keystone_public
bind {{ kolla_internal_address }}:{{ keystone_public_port }}