Merge pull request #56 from grobinson-blockchain/master
Support optional overwrite of existing configuration files
This commit is contained in:
commit
b69c7edebd
2 changed files with 5 additions and 0 deletions
|
@ -14,3 +14,7 @@ haproxy.config:
|
||||||
- service: haproxy.service
|
- service: haproxy.service
|
||||||
- watch_in:
|
- watch_in:
|
||||||
- service: haproxy.service
|
- 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 %}
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
haproxy:
|
haproxy:
|
||||||
enabled: True
|
enabled: True
|
||||||
|
overwrite: True # Overwrite an existing config file if present (default behaviour unless set to false)
|
||||||
config_file_path: /etc/haproxy/haproxy.cfg
|
config_file_path: /etc/haproxy/haproxy.cfg
|
||||||
global:
|
global:
|
||||||
stats:
|
stats:
|
||||||
|
|
Loading…
Reference in a new issue