Fix SSL bind condtions
SSL was not enabled in case if certifcates, keys, and chain were
declared separately. It was only set when PEM file is defined explicitly.
Change-Id: I38a1c9bc654cbb6d4babe41e3129959adfa25598
diff --git a/haproxy/files/haproxy.cfg b/haproxy/files/haproxy.cfg
index f7c976d..67b9ae5 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