## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }} {%- from "haproxy/map.jinja" import haproxy with context %} {% for name, values in haproxy.config.spoe.items() -%} [{{ name }}] spoe-agent {{ name }} messages {{ " ".join(values.messages.keys()) }} option var-prefix {{ name }} log global timeout hello {{ values.timeout_hello|default("2s") }} timeout idle {{ values.timeout_idle|default("2m") }} timeout processing {{ values.timeout_processing|default("300ms") }} use-backend {{ name }} {% for name, values in values.messages.items() -%} spoe-message {{ name }} {%- if values.args.keys()|length > 0 %} args {% for i, v in values.args.items() %}{{ "{}={}".format(i,v) }} {% endfor %} {%- endif %} {%- if values.event %} event {{ values.event }} {%- endif %} {% endfor -%} {% endfor -%}