Fix typo and add some nice indentation
This commit is contained in:
parent
1876b5ae35
commit
cd237e0109
1 changed files with 45 additions and 42 deletions
|
@ -35,15 +35,18 @@ defaults
|
|||
retries {{ salt['pillar.get']('haproxy:defaults:retries') }}
|
||||
{%- if 'options' in salt['pillar.get']('haproxy:defaults', {}) %}
|
||||
{%- for option in salt['pillar.get']('haproxy:defaults:options') %}
|
||||
option {{ option }}{% endfor %}
|
||||
option {{ option }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{%- if 'timeouts' in salt['pillar.get']('haproxy:defaults', {}) %}
|
||||
{%- for timeout in salt['pillar.get']('haproxy:defaults:timeouts') %}
|
||||
timeout {{ timeout }}{% endfor %}
|
||||
timeout {{ timeout }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{%- if 'errorfiles' in salt['pillar.get']('haproxy:defaults', {}) %}
|
||||
{%- for errorfile in salt['pillar.get']('haproxy:defaults:errorfiles').iteritems() %}
|
||||
errorfile {{ errorfile[0] }} {{ errorfile[1] }}{% endfor %}
|
||||
errorfile {{ errorfile[0] }} {{ errorfile[1] }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -85,12 +88,12 @@ redirect {{ front_redirect }}
|
|||
# backend instances
|
||||
#---------------------------------------------------------------------
|
||||
{%- if 'backends' in salt['pillar.get']('haproxy', {}) %}
|
||||
{%- for backend in salt['pillar.get']('haproxy:backends', {}).iteritems() %}
|
||||
{%- for backend in salt['pillar.get']('haproxy:backends', {}).iteritems() %} # Backend loop start
|
||||
backend {{ backend[1].name }}
|
||||
{%- if 'redirects' in backend[1] %}
|
||||
{%- for redirect in backend[1].redirects %}
|
||||
{%- for redirect in backend[1].redirects %} # Redirect loop start
|
||||
redirect {{ redirect }}{% endfor %}
|
||||
{-% endif %}
|
||||
{%- endif %}
|
||||
balance {{ backend[1].balance }}
|
||||
{%- if 'options' in backend[1] %}
|
||||
{%- for option in backend[1].options %}
|
||||
|
@ -113,5 +116,5 @@ redirect {{ redirect }}{% endfor %}
|
|||
{%- for server in backend[1].servers.iteritems() %}
|
||||
server {{ server[1].name }} {{ server[1].host }}:{{ server[1].port }} {{ server[1].check }}{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %} # Backend loop end
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue