salt-statetree/haproxy/pkg.sls
2024-02-22 20:33:44 +01:00

30 lines
654 B
Text

{% from tpldir+"/map.jinja" import haproxy with context %}
haproxy_pkg_pkgs:
pkg.installed:
- pkgs:
- haproxy
haproxy_pkg_conf_dir:
file.directory:
- name: /etc/haproxy/conf.d
- user: root
- group: root
- file_mode: '0644'
- dir_mode: '0755'
- require:
- haproxy_pkg_pkgs
haproxy_pkg_rc_script:
file.managed:
- name: /etc/init.d/haproxy
- source: salt://{{ tpldir }}/files/haproxy_rcscript.initd
- template: jinja
- context:
sls: {{ sls }}
conf_dir: {{ haproxy.conf_dir }}
- user: root
- group: root
- mode: '0755'
- require:
- haproxy_pkg_conf_dir