Working userlist implementation

This commit is contained in:
John Keates 2015-06-08 16:14:28 +02:00
parent 2019204b01
commit 86cf6b1a09

View file

@ -27,12 +27,22 @@ global
{%- for id, userlist in salt['pillar.get']('haproxy:userlists', {}).iteritems() %}
userlist {{ id }}
{%- for entry in userlist.iteritems() %}
{{ entry }}
{%- 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