Merge "Fix host and proxy selection lists to be sorted"
diff --git a/haproxy/files/haproxy.cfg b/haproxy/files/haproxy.cfg
index f7c976d..3a2283b 100644
--- a/haproxy/files/haproxy.cfg
+++ b/haproxy/files/haproxy.cfg
@@ -63,7 +63,7 @@
listen {{ listen_name }}
{%- for bind in listen.binds %}
- bind {{ bind.address }}:{{ bind.port }} {% if bind.get('ssl', {}).enabled|default(False) %}{% if bind.ssl.pem_file is defined %}ssl crt {{ bind.ssl.pem_file }}{% else %}crt /etc/haproxy/ssl/{{ listen_name }}{% endif %}{% endif %}
+ bind {{ bind.address }}:{{ bind.port }} {% if bind.get('ssl', {}).enabled|default(False) %}{% if bind.ssl.pem_file is defined %}ssl crt {{ bind.ssl.pem_file }}{% else %}ssl crt /etc/haproxy/ssl/{{ listen_name }}{% endif %}{% endif %}
{%- endfor %}
{%- if listen.get('type', None) == 'http' %}
mode http
@@ -169,10 +169,10 @@
{%- endfor %}
{%- for type, checks in listen.get('health-check', {}).iteritems() %}
{%- if checks.get('enabled', True) %}
- {%- if type == 'http' and 'httpchk' not in listen.get('options', []) %}
+ {%- if type == 'http' and 'httpchk' not in listen.get('options', [])|join('|') %}
option httpchk
{%- endif %}
- {%- if type == 'tcp' and 'tcp-check' not in listen.get('options', []) %}
+ {%- if type == 'tcp' and 'tcp-check' not in listen.get('options', [])|join('|') %}
option tcp-check
{%- endif %}
{%- for option in checks.get('options', []) %}