2015-02-24 16:19:02 -05:00
|
|
|
haproxy.config:
|
|
|
|
file.managed:
|
2015-03-17 05:16:55 -04:00
|
|
|
- name: {{ salt['pillar.get']('haproxy:config_file_path', '/etc/haproxy/haproxy.cfg') }}
|
2015-02-24 16:19:02 -05:00
|
|
|
- source: salt://haproxy/templates/haproxy.jinja
|
|
|
|
- template: jinja
|
|
|
|
- user: root
|
2016-06-07 15:06:56 -04:00
|
|
|
{% if salt['grains.get']('os_family') == 'FreeBSD' %}
|
|
|
|
- group: wheel
|
|
|
|
{% else %}
|
2015-02-24 16:19:02 -05:00
|
|
|
- group: root
|
2016-06-07 15:06:56 -04:00
|
|
|
{% endif %}
|
2015-02-24 16:19:02 -05:00
|
|
|
- mode: 644
|
2016-01-13 04:41:39 -05:00
|
|
|
- require_in:
|
2015-10-01 18:45:56 -04:00
|
|
|
- service: haproxy.service
|
2016-01-13 04:41:39 -05:00
|
|
|
- watch_in:
|
2016-06-07 15:06:56 -04:00
|
|
|
- service: haproxy.service
|
2016-06-29 05:53:27 -04:00
|
|
|
{% if salt['pillar.get']('haproxy:overwrite', default=True) == False %}
|
|
|
|
- unless:
|
|
|
|
- test -e /etc/haproxy/haproxy.cfg
|
|
|
|
{% endif %}
|