If not enabled in pillar, kill the service.
This commit is contained in:
parent
eb6b073ad2
commit
672fe36551
1 changed files with 7 additions and 0 deletions
|
@ -1,12 +1,19 @@
|
|||
haproxy.service:
|
||||
{% if salt['pillar.get']('haproxy:enable', True) %}
|
||||
service.running:
|
||||
- name: haproxy
|
||||
- enable: True
|
||||
- reload: True
|
||||
- require:
|
||||
- pkg: haproxy
|
||||
file: haproxy.service
|
||||
- watch:
|
||||
- file: haproxy.config
|
||||
{% else %}
|
||||
service.dead:
|
||||
- name: haproxy
|
||||
- enable: False
|
||||
{% endif %}
|
||||
file.replace:
|
||||
- name: /etc/default/haproxy
|
||||
{% if salt['pillar.get']('haproxy:enabled', True) %}
|
||||
|
|
Loading…
Reference in a new issue