diff --git a/consul/config.sls b/consul/config.sls index cde3836..025f3f0 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: {{ script.get('context', {}) | yaml }} - user: consul - group: consul - mode: 0755 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