diff --git a/templates/frontend.cfg b/templates/frontend.cfg index d4dd55a..a32c015 100644 --- a/templates/frontend.cfg +++ b/templates/frontend.cfg @@ -5,7 +5,7 @@ frontend {{ item.name }} {%if item.ip is defined %}{{ item.ip }}{% endif %}{%if {% if item.bind is defined -%} {%- for bind in item.bind -%} - bind {{ bind }}{% if item.ssl is defined %}{% if item.ssl.cert is defined %} ssl crt {{ item.ssl.cert }}{% if item.ssl.ciphers is defined %} ciphers {{ item.ssl.ciphers }}{% endif %}{% endif %}{% endif %} + bind {{ bind }} {% if item.ssl is defined %} {% if item.ssl.cert is defined %} ssl crt {{ item.ssl.cert }} {% if item.ssl.ciphers is defined %} ciphers {{ item.ssl.ciphers }} {% endif %}{% endif %}{% endif %} {% if item.params is defined %}{% for param in item.params %} {{ param }} {% endfor %} {% endif %} {% endfor -%} {% endif -%} @@ -125,7 +125,8 @@ frontend {{ item.name }} {%if item.ip is defined %}{{ item.ip }}{% endif %}{%if {%- if item.use_backend is defined -%} {%- for backend in item.use_backend -%} - use_backend {{ backend.name }} {{ backend.condition }} + use_backend {{ backend.name }} {% if 'condition' in backend %} {{ backend.condition }} {% endif %} + {% endfor -%} {% endif -%} diff --git a/vars/main.yml b/vars/main.yml index 3baea50..4db877c 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -84,6 +84,8 @@ empty: true # ssl: # cert: /etc/ssl/private/cert.pem # ciphers: 'RC4-SHA:AES128-SHA:AES:!ADH:!aNULL:!DH:!EDH:!eNULL' +# params: +# - ca-file /etc/ssl/private/certCA.pem # maxconn: # monitor: # uri: