Merge pull request #21 from johnkeates/master
Two features added, two gremlins zapped
This commit is contained in:
commit
ac1e5e3417
1 changed files with 27 additions and 2 deletions
|
@ -46,7 +46,7 @@ global
|
|||
spread-checks {{ salt['pillar.get']('haproxy:global:spreadchecks') }}
|
||||
{%- endif %}
|
||||
{%- if 'tune' in salt['pillar.get']('haproxy:global', {}) %}
|
||||
{{- render_list_of_dictionaries('tune', salt['pillar.get']('haproxy:global:tune'), ' ','.') }}
|
||||
{{- render_list_of_dictionaries('tune', salt['pillar.get']('haproxy:global:tune'), ' ','.') }}
|
||||
{%- endif %}
|
||||
{%- if 'ssl-default-bind-ciphers' in salt['pillar.get']('haproxy:global', {}) %}
|
||||
{{- render_list_of_dictionaries('ssl-default-bind-ciphers', salt['pillar.get']('haproxy:global:ssl-default-bind-ciphers')) }}
|
||||
|
@ -55,6 +55,25 @@ global
|
|||
{{- render_list_of_dictionaries('ssl-default-bind-options', salt['pillar.get']('haproxy:global:ssl-default-bind-options')) }}
|
||||
{%- endif %}
|
||||
|
||||
{%- for id, userlist in salt['pillar.get']('haproxy:userlists', {}).iteritems() %}
|
||||
#------------------
|
||||
# Global Userlists
|
||||
#------------------
|
||||
userlist {{ id }}
|
||||
{%- for id, entry in userlist.iteritems() %}
|
||||
{%- if id == "groups" %}
|
||||
{%- for group in entry.iteritems() %}
|
||||
group {{ group[0] }} {{ group[1] }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{%- if id == "users" %}
|
||||
{%- for user in entry.iteritems() %}
|
||||
user {{ user[0] }} {{ user[1] }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
{% endfor %}
|
||||
|
||||
#------------------
|
||||
# common defaults that all the 'listen' and 'backend' sections will
|
||||
# use- if not designated in their block
|
||||
|
@ -80,7 +99,7 @@ defaults
|
|||
timeout server 1m
|
||||
{%- endif %}
|
||||
{%- if 'stats' in salt['pillar.get']('haproxy:defaults', {}) -%}
|
||||
{{ render_list_of_dictionaries('stats', salt['pillar.get']('haproxy:defaults:stats')) }}
|
||||
{{ render_list_of_dictionaries('stats', salt['pillar.get']('haproxy:defaults:stats')) }}
|
||||
{%- endif %}
|
||||
{%- if 'errorfiles' in salt['pillar.get']('haproxy:defaults', {}) %}
|
||||
{%- for errorfile in salt['pillar.get']('haproxy:defaults:errorfiles').iteritems() %}
|
||||
|
@ -307,6 +326,12 @@ frontend {{ frontend[1].get('name', frontend[0]) }}
|
|||
{%- if 'httprequests' in frontend[1] %}
|
||||
{{- render_list_of_dictionaries('http-request', frontend[1].httprequests) }}
|
||||
{%- endif %}
|
||||
{%- if 'httpresponses' in frontend[1] %}
|
||||
{{- render_list_of_dictionaries('http-response', frontend[1].httpresponses) }}
|
||||
{%- endif %}
|
||||
{%- if 'rspadds' in frontend[1] %}
|
||||
{{- render_list_of_dictionaries('rspadd', frontend[1].rspadds) }}
|
||||
{%- endif %}
|
||||
{%- if 'reqadds' in frontend[1] %}
|
||||
{{- render_list_of_dictionaries('reqadd', frontend[1].reqadds) }}
|
||||
{%- endif %}
|
||||
|
|
Loading…
Reference in a new issue