paulbsd-salt/states/haproxy/install.sls

24 lines
665 B
Plaintext
Raw Normal View History

2022-10-01 20:06:19 +02:00
---
{%- from "haproxy/map.jinja" import haproxy with context %}
haproxy-pkg:
pkg.installed:
2022-10-10 10:16:32 +02:00
- 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 %}