From 55d9e99bbd33ba96b2181c172175d74223260e86 Mon Sep 17 00:00:00 2001 From: Hugo Chinchilla Carbonell Date: Wed, 6 Sep 2017 15:48:11 +0200 Subject: [PATCH 1/3] add context to script templates --- consul/config.sls | 1 + 1 file changed, 1 insertion(+) diff --git a/consul/config.sls b/consul/config.sls index 1d079b5..4ba6f5b 100644 --- a/consul/config.sls +++ b/consul/config.sls @@ -20,6 +20,7 @@ consul-script-install-{{ loop.index }}: - source: {{ script.source }} - name: {{ script.name }} - template: jinja + - context: {{ template.get('context', {}) | yaml }} - user: consul - group: consul - mode: 0755 From 1acaa1c0c3fabe61dc050ac5c884e62ce7c971e2 Mon Sep 17 00:00:00 2001 From: Hugo Chinchilla Carbonell Date: Wed, 6 Sep 2017 15:56:28 +0200 Subject: [PATCH 2/3] fix variable name --- consul/config.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consul/config.sls b/consul/config.sls index 4ba6f5b..4f3fa92 100644 --- a/consul/config.sls +++ b/consul/config.sls @@ -20,7 +20,7 @@ consul-script-install-{{ loop.index }}: - source: {{ script.source }} - name: {{ script.name }} - template: jinja - - context: {{ template.get('context', {}) | yaml }} + - context: {{ script.get('context', {}) | yaml }} - user: consul - group: consul - mode: 0755 From 93ad943308c43b33b3238e4437efac6522a6c0f2 Mon Sep 17 00:00:00 2001 From: Hugo Chinchilla Carbonell Date: Mon, 11 Sep 2017 13:16:51 +0200 Subject: [PATCH 3/3] update pillar.example --- pillar.example | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pillar.example b/pillar.example index 84d8f61..1381741 100644 --- a/pillar.example +++ b/pillar.example @@ -26,6 +26,8 @@ consul: scripts: - source: salt://files/consul/check_redis.py name: /usr/local/share/consul/check_redis.py + context: + port: 6379 consul_template: # Start consul-template daemon and enable it at boot time