paulbsd-salt/states/haproxy/install.sls
Paul Lecuq b4c3cd9658
Some checks failed
continuous-integration/drone/push Build is failing
updated haproxy state
2022-12-11 16:34:27 +01:00

39 lines
1010 B
Plaintext

---
{%- from "haproxy/map.jinja" import haproxy with context %}
haproxy-pkg:
pkg.latest:
- pkgs: {{ haproxy.packages }}
haproxy-config-dir:
file.directory:
- name: {{ haproxy.config.dir }}
- user: {{ haproxy.config.user }}
- group: {{ haproxy.config.group }}
- mode: "0700"
haproxy-config-maps-dir:
file.directory:
- name: {{ haproxy.config.dir }}/maps
- user: {{ haproxy.config.user }}
- group: {{ haproxy.config.group }}
- mode: "0700"
haproxy-config-script-dir:
file.directory:
- name: {{ haproxy.config.dir }}/scripts
- user: {{ haproxy.config.user }}
- group: {{ haproxy.config.group }}
- mode: "0700"
{% for file in haproxy.scripts %}
haproxy-script-{{ file.name }}:
file.managed:
- name: {{ haproxy.config.dir }}/{{ file.name }}
- source: salt://haproxy/{{ file.name }}
- user: {{ haproxy.config.user }}
- group: {{ haproxy.config.group }}
- mode: "0700"
- watch_in:
- service: haproxy-service
{% endfor %}