From dbca682f5e41710e58fbbc04aeddb7229de8a7ac Mon Sep 17 00:00:00 2001 From: Olivier JAN Date: Mon, 30 Jan 2017 14:48:46 +0100 Subject: [PATCH 1/2] add global_option variable --- defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/defaults/main.yml b/defaults/main.yml index ef2afe94..6c1b1bb9 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -29,6 +29,7 @@ haproxy_global_ssl_default_bind_options: 'no-sslv3' haproxy_global_ssl_default_server_ciphers: 'kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL' haproxy_global_ssl_default_server_options: 'no-sslv3' haproxy_global_nbproc: 1 +haproxy_global_option: [] # defaults section haproxy_defaults_log: global From 99779ce49fd32920267b7c2e22614246bf607e34 Mon Sep 17 00:00:00 2001 From: Olivier JAN Date: Mon, 30 Jan 2017 14:50:31 +0100 Subject: [PATCH 2/2] add global_option --- templates/etc/haproxy/global.cfg.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/etc/haproxy/global.cfg.j2 b/templates/etc/haproxy/global.cfg.j2 index 10b2ccac..26c620c2 100644 --- a/templates/etc/haproxy/global.cfg.j2 +++ b/templates/etc/haproxy/global.cfg.j2 @@ -74,3 +74,9 @@ {% for tune in haproxy_global_tune | default([]) %} tune.{{ tune.key }} {{ tune.value }} {% endfor %} + +{% if haproxy_global_option != false %} +{% for option in haproxy_global_option %} + {{ option }} +{% endfor %} +{% endif %}