Merge remote-tracking branch 'saltstack-formulas/master'

This commit is contained in:
John Keates 2015-05-22 22:49:36 +02:00
commit 1876b5ae35
2 changed files with 29 additions and 0 deletions

View File

@ -92,6 +92,23 @@ backend {{ backend[1].name }}
redirect {{ redirect }}{% endfor %}
{-% endif %}
balance {{ backend[1].balance }}
{%- if 'options' in backend[1] %}
{%- for option in backend[1].options %}
option {{ option }}
{%- endfor %}
{%- endif %}
{%- if 'cookie' in backend[1] %}
cookie {{ backend[1].cookie }}
{%- endif %}
{%- if 'stats' in backend[1] %}
{%- for option, value in backend[1].stats.iteritems() %}
{%- if option == 'enable' and value %}
stats enable
{%- else %}
stats {{ option }} {{ value }}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- if 'servers' in backend[1] %}
{%- for server in backend[1].servers.iteritems() %}
server {{ server[1].name }} {{ server[1].host }}:{{ server[1].port }} {{ server[1].check }}{% endfor %}

View File

@ -74,11 +74,23 @@ haproxy:
server1:
name: server1-its-name
host: 192.168.1.213
port: 80
check: check
backend2:
name: static
balance: roundrobin
redirect: scheme https if !{ ssl_fc }
options:
- http-server-close
- httpclose
- forwardfor except 127.0.0.0/8
- httplog
cookie: "pm insert indirect"
stats:
enable: True
uri: /url/to/stats
realm: LoadBalancer
auth: "user:password"
servers:
server1:
name: some-server