From df3aeb1e4c0a5ba682a0265fde8b992196a998a7 Mon Sep 17 00:00:00 2001 From: George Robinson Date: Wed, 29 Jun 2016 10:53:27 +0100 Subject: [PATCH] Support disable overwrite of existing haproxy config file --- haproxy/config.sls | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/haproxy/config.sls b/haproxy/config.sls index 37f366f..b0deda1 100644 --- a/haproxy/config.sls +++ b/haproxy/config.sls @@ -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 /etc/haproxy/haproxy.cfg + {% endif %}