Merge pull request #35 from morsik/patch-2

/etc/default/haproxy exists only on Debian-based distros
This commit is contained in:
Forrest 2015-11-13 11:47:02 -08:00
commit bcd7756b9d

View file

@ -6,12 +6,15 @@ haproxy.service:
- reload: True - reload: True
- require: - require:
- pkg: haproxy - pkg: haproxy
file: haproxy.service {% if salt['grains.get']('os_family') == 'Debian' %}
- file: haproxy.service
{% endif %}
{% else %} {% else %}
service.dead: service.dead:
- name: haproxy - name: haproxy
- enable: False - enable: False
{% endif %} {% endif %}
{% if salt['grains.get']('os_family') == 'Debian' %}
file.replace: file.replace:
- name: /etc/default/haproxy - name: /etc/default/haproxy
{% if salt['pillar.get']('haproxy:enabled', True) %} {% if salt['pillar.get']('haproxy:enabled', True) %}
@ -22,3 +25,4 @@ haproxy.service:
- repl: ENABLED=0 - repl: ENABLED=0
{% endif %} {% endif %}
- show_changes: True - show_changes: True
{% endif %}