Merge pull request #56 from grobinson-blockchain/master

Support optional overwrite of existing configuration files
This commit is contained in:
Forrest 2016-06-29 09:52:58 -07:00 committed by GitHub
commit b69c7edebd
2 changed files with 5 additions and 0 deletions

View file

@ -14,3 +14,7 @@ haproxy.config:
- service: haproxy.service
- watch_in:
- service: haproxy.service
{% if salt['pillar.get']('haproxy:overwrite', default=True) == False %}
- unless:
- test -e {{ salt['pillar.get']('haproxy:config_file_path', '/etc/haproxy/haproxy.cfg') }}
{% endif %}

View file

@ -4,6 +4,7 @@
haproxy:
enabled: True
overwrite: True # Overwrite an existing config file if present (default behaviour unless set to false)
config_file_path: /etc/haproxy/haproxy.cfg
global:
stats: