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