40 lines
855 B
Text
40 lines
855 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_config:
|
|
file.managed:
|
|
- name: /etc/haproxy/haproxy.cfg
|
|
- user: root
|
|
- group: root
|
|
- mode: '0644'
|
|
- require:
|
|
- haproxy_pkg_pkgs
|
|
|
|
haproxy_pkg_rc_script:
|
|
file.managed:
|
|
- name: /etc/init.d/haproxy
|
|
- source: salt://{{ tpldir }}/files/haproxy_rcscript.initd.jinja
|
|
- template: jinja
|
|
- context:
|
|
sls: {{ sls }}
|
|
conf_dir: {{ haproxy.conf_dir }}
|
|
- user: root
|
|
- group: root
|
|
- mode: '0755'
|
|
- require:
|
|
- haproxy_pkg_conf_dir
|
|
- haproxy_pkg_config
|