2022-10-01 20:06:19 +02:00
|
|
|
---
|
|
|
|
{%- from "haproxy/map.jinja" import haproxy with context %}
|
|
|
|
haproxy-pkg:
|
2022-12-24 17:48:15 +01:00
|
|
|
pkg.installed:
|
2022-10-10 10:16:32 +02:00
|
|
|
- pkgs: {{ haproxy.packages }}
|
|
|
|
|
2022-11-08 11:04:39 +01:00
|
|
|
haproxy-config-dir:
|
|
|
|
file.directory:
|
|
|
|
- name: {{ haproxy.config.dir }}
|
|
|
|
- user: {{ haproxy.config.user }}
|
|
|
|
- group: {{ haproxy.config.group }}
|
|
|
|
- mode: "0700"
|
|
|
|
|
|
|
|
haproxy-config-maps-dir:
|
2022-10-23 16:37:53 +02:00
|
|
|
file.directory:
|
|
|
|
- name: {{ haproxy.config.dir }}/maps
|
|
|
|
- user: {{ haproxy.config.user }}
|
|
|
|
- group: {{ haproxy.config.group }}
|
|
|
|
- mode: "0700"
|
|
|
|
|
2022-11-08 11:04:39 +01:00
|
|
|
haproxy-config-script-dir:
|
2022-10-10 10:16:32 +02:00
|
|
|
file.directory:
|
|
|
|
- name: {{ haproxy.config.dir }}/scripts
|
|
|
|
- user: {{ haproxy.config.user }}
|
|
|
|
- group: {{ haproxy.config.group }}
|
|
|
|
- mode: "0700"
|
|
|
|
|
2023-01-04 21:44:03 +01:00
|
|
|
haproxy-config-mods-dir:
|
|
|
|
file.directory:
|
|
|
|
- name: {{ haproxy.config.dir }}/mods
|
|
|
|
- user: {{ haproxy.config.user }}
|
|
|
|
- group: {{ haproxy.config.group }}
|
|
|
|
- mode: "0700"
|
|
|
|
|
2022-10-23 16:37:53 +02:00
|
|
|
{% for file in haproxy.scripts %}
|
|
|
|
haproxy-script-{{ file.name }}:
|
2022-10-10 10:16:32 +02:00
|
|
|
file.managed:
|
2022-10-23 16:37:53 +02:00
|
|
|
- name: {{ haproxy.config.dir }}/{{ file.name }}
|
|
|
|
- source: salt://haproxy/{{ file.name }}
|
2022-10-10 10:16:32 +02:00
|
|
|
- user: {{ haproxy.config.user }}
|
|
|
|
- group: {{ haproxy.config.group }}
|
|
|
|
- mode: "0700"
|
|
|
|
- watch_in:
|
|
|
|
- service: haproxy-service
|
2022-10-23 16:37:53 +02:00
|
|
|
{% endfor %}
|