diff --git a/haproxy/templates/haproxy.jinja b/haproxy/templates/haproxy.jinja index bb2534c..29544cc 100644 --- a/haproxy/templates/haproxy.jinja +++ b/haproxy/templates/haproxy.jinja @@ -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