Merge pull request #21 from johnkeates/master

Two features added, two gremlins zapped
This commit is contained in:
puneet kandhari 2015-08-30 15:18:39 -05:00
commit ac1e5e3417

View file

@ -46,7 +46,7 @@ global
spread-checks {{ salt['pillar.get']('haproxy:global:spreadchecks') }} spread-checks {{ salt['pillar.get']('haproxy:global:spreadchecks') }}
{%- endif %} {%- endif %}
{%- if 'tune' in salt['pillar.get']('haproxy:global', {}) %} {%- 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 %} {%- endif %}
{%- if 'ssl-default-bind-ciphers' in salt['pillar.get']('haproxy:global', {}) %} {%- 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')) }} {{- 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')) }} {{- render_list_of_dictionaries('ssl-default-bind-options', salt['pillar.get']('haproxy:global:ssl-default-bind-options')) }}
{%- endif %} {%- 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 # common defaults that all the 'listen' and 'backend' sections will
# use- if not designated in their block # use- if not designated in their block
@ -80,7 +99,7 @@ defaults
timeout server 1m timeout server 1m
{%- endif %} {%- endif %}
{%- if 'stats' in salt['pillar.get']('haproxy:defaults', {}) -%} {%- 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 %} {%- endif %}
{%- if 'errorfiles' in salt['pillar.get']('haproxy:defaults', {}) %} {%- if 'errorfiles' in salt['pillar.get']('haproxy:defaults', {}) %}
{%- for errorfile in salt['pillar.get']('haproxy:defaults:errorfiles').iteritems() %} {%- 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] %} {%- if 'httprequests' in frontend[1] %}
{{- render_list_of_dictionaries('http-request', frontend[1].httprequests) }} {{- render_list_of_dictionaries('http-request', frontend[1].httprequests) }}
{%- endif %} {%- 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] %} {%- if 'reqadds' in frontend[1] %}
{{- render_list_of_dictionaries('reqadd', frontend[1].reqadds) }} {{- render_list_of_dictionaries('reqadd', frontend[1].reqadds) }}
{%- endif %} {%- endif %}