From 418a6c88965567873cc207ab5b8ce15e524dc366 Mon Sep 17 00:00:00 2001 From: Nikita Gerasimov Date: Thu, 24 May 2018 17:09:15 +0300 Subject: [PATCH] Adds parameter to configure HAProxy defaults balance Introduce new option "haproxy_defaults_balance" to set balance in defaults section. Change-Id: Iaf12717ffac94ac2308758bd8ec87f088af26b69 Closes-Bug: #1773178 --- ansible/roles/haproxy/defaults/main.yml | 3 +++ ansible/roles/haproxy/templates/haproxy.cfg.j2 | 1 + 2 files changed, 4 insertions(+) diff --git a/ansible/roles/haproxy/defaults/main.yml b/ansible/roles/haproxy/defaults/main.yml index 8773b984cb..77e91b2c97 100644 --- a/ansible/roles/haproxy/defaults/main.yml +++ b/ansible/roles/haproxy/defaults/main.yml @@ -39,6 +39,9 @@ haproxy_image_full: "{{ haproxy_image }}:{{ haproxy_tag }}" haproxy_client_timeout: "1m" haproxy_server_timeout: "1m" +# Check http://www.haproxy.org/download/1.5/doc/configuration.txt for available options +haproxy_defaults_balance: "roundrobin" + haproxy_glance_api_client_timeout: "6h" haproxy_glance_api_server_timeout: "6h" diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2 index 906ce69338..28084691ff 100644 --- a/ansible/roles/haproxy/templates/haproxy.cfg.j2 +++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2 @@ -33,6 +33,7 @@ defaults timeout client {{ haproxy_client_timeout }} timeout server {{ haproxy_server_timeout }} timeout check 10s + balance {{ haproxy_defaults_balance }} listen stats bind {{ api_interface_address }}:{{ haproxy_stats_port }}