Allowed for default balance
balance with default of roundrobin, and allowed for lack of balance in the backends
This commit is contained in:
parent
e00b5907d0
commit
7e31bee197
1 changed files with 3 additions and 0 deletions
|
@ -33,6 +33,7 @@ defaults
|
||||||
log {{ salt['pillar.get']('haproxy:defaults:log') }}
|
log {{ salt['pillar.get']('haproxy:defaults:log') }}
|
||||||
mode {{ salt['pillar.get']('haproxy:defaults:mode') }}
|
mode {{ salt['pillar.get']('haproxy:defaults:mode') }}
|
||||||
retries {{ salt['pillar.get']('haproxy:defaults:retries') }}
|
retries {{ salt['pillar.get']('haproxy:defaults:retries') }}
|
||||||
|
balance {{ salt['pillar.get']('haproxy:defaults:balance', 'roundrobin') }}
|
||||||
{%- if 'options' in salt['pillar.get']('haproxy:defaults', {}) %}
|
{%- if 'options' in salt['pillar.get']('haproxy:defaults', {}) %}
|
||||||
{%- for option in salt['pillar.get']('haproxy:defaults:options') %}
|
{%- for option in salt['pillar.get']('haproxy:defaults:options') %}
|
||||||
option {{ option }}
|
option {{ option }}
|
||||||
|
@ -94,7 +95,9 @@ backend {{ backend[1].name }}
|
||||||
{%- for redirect in backend[1].redirects %} # Redirect loop start
|
{%- for redirect in backend[1].redirects %} # Redirect loop start
|
||||||
redirect {{ redirect }}{% endfor %}
|
redirect {{ redirect }}{% endfor %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{%- if 'balance' in backend[1] %}
|
||||||
balance {{ backend[1].balance }}
|
balance {{ backend[1].balance }}
|
||||||
|
{%- endif %}
|
||||||
{%- if 'options' in backend[1] %}
|
{%- if 'options' in backend[1] %}
|
||||||
{%- for option in backend[1].options %}
|
{%- for option in backend[1].options %}
|
||||||
option {{ option }}
|
option {{ option }}
|
||||||
|
|
Loading…
Reference in a new issue