Change formatting options, add request handler
This commit is contained in:
parent
df2c761cd8
commit
eb4175413e
1 changed files with 5 additions and 0 deletions
|
@ -51,6 +51,7 @@ defaults
|
|||
log {{ salt['pillar.get']('haproxy:defaults:log') }}
|
||||
mode {{ salt['pillar.get']('haproxy:defaults:mode') }}
|
||||
retries {{ salt['pillar.get']('haproxy:defaults:retries') }}
|
||||
|
||||
# options
|
||||
{%- if 'options' in salt['pillar.get']('haproxy:defaults', {}) %}
|
||||
{%- for option in salt['pillar.get']('haproxy:defaults:options') %}
|
||||
|
@ -80,18 +81,21 @@ defaults
|
|||
{%- for frontend in salt['pillar.get']('haproxy:frontends', {}).iteritems() %}
|
||||
frontend {{ frontend[1].name }}
|
||||
bind {{ frontend[1].bind }}
|
||||
|
||||
# frontend redirects
|
||||
{%- if 'redirects' in frontend[1] %}
|
||||
{%- for front_redirect in frontend[1].redirects %}
|
||||
redirect {{ front_redirect }}
|
||||
{% endfor %}
|
||||
{%- endif %}
|
||||
|
||||
# frontend acls
|
||||
{%- if 'acls' in frontend[1] %}
|
||||
{%- for acl in frontend[1].acls %}
|
||||
acl {{ acl }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
|
||||
# frontend http-requests
|
||||
{%- if 'http_requests' in frontend[1] %}
|
||||
{%- for http_request in frontend[1].http_requests %}
|
||||
|
@ -105,6 +109,7 @@ http-request {{ http_request }}
|
|||
reqadd {{ reqadd }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
|
||||
# backend targets
|
||||
default_backend {{ frontend[1].default_backend }}
|
||||
{%-if 'use_backends' in frontend[1] -%}
|
||||
|
|
Loading…
Reference in a new issue