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

@ -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
@ -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 %}