paulbsd-salt/states/haproxy/config.sls
2023-06-23 08:47:25 +02:00

37 lines
1.0 KiB
Plaintext

---
{%- from "haproxy/map.jinja" import haproxy with context %}
{% for map in haproxy.maps %}
haproxy-maps-{{ map }}:
file.managed:
- name: {{ haproxy.config.dir }}/maps/{{ map }}
- source: salt://haproxy/templates/maps/{{ map }}.j2
- user: {{ haproxy.config.user }}
- group: {{ haproxy.config.group }}
- mode: "0600"
- template: jinja
- watch_in:
- service: haproxy-service
{% endfor %}
haproxy-config-main:
file.managed:
- name: {{ haproxy.config.dir }}/{{ haproxy.config.configfile }}
- source: salt://haproxy/templates/haproxy.cfg.j2
- user: {{ haproxy.config.user }}
- group: {{ haproxy.config.group }}
- mode: "0600"
- template: jinja
- watch_in:
- service: haproxy-service
haproxy-config-spoe:
file.managed:
- name: {{ haproxy.config.dir }}/spoe.cfg
- source: salt://haproxy/templates/spoe.cfg.j2
- user: {{ haproxy.config.user }}
- group: {{ haproxy.config.group }}
- mode: "0600"
- template: jinja
- watch_in:
- service: haproxy-service