aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/haproxy
diff options
context:
space:
mode:
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 }}