paulbsd-salt/states/haproxy/install.sls
2022-10-10 10:16:32 +02:00

24 lines
665 B
Plaintext

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