From 9bf451fc0363b444fc89b70366ce151d54c3eef9 Mon Sep 17 00:00:00 2001 From: Nicolas Delaby Date: Tue, 17 Mar 2015 10:16:55 +0100 Subject: [PATCH] Allow customization of configuration file path --- haproxy/config.sls | 2 +- pillar.example | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/haproxy/config.sls b/haproxy/config.sls index 63f51f2..e4fa11d 100644 --- a/haproxy/config.sls +++ b/haproxy/config.sls @@ -1,6 +1,6 @@ haproxy.config: file.managed: - - name: /etc/haproxy/haproxy.cfg + - name: {{ salt['pillar.get']('haproxy:config_file_path', '/etc/haproxy/haproxy.cfg') }} - source: salt://haproxy/templates/haproxy.jinja - template: jinja - user: root diff --git a/pillar.example b/pillar.example index 78ed658..137b9de 100644 --- a/pillar.example +++ b/pillar.example @@ -3,6 +3,7 @@ # haproxy: + config_file_path: /etc/haproxy/haproxy.cfg global: stats: enable: True @@ -82,4 +83,4 @@ haproxy: name: some-server host: 123.156.189.111 port: 8080 - check: check \ No newline at end of file + check: check