From 53cee1b3cdbef3979561a56d743b45441b2574cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Kandemir?= Date: Sat, 10 Oct 2015 00:46:19 +0300 Subject: [PATCH] Install scripts to correct folder --- consul/files/services.json | 2 +- consul/init.sls | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/consul/files/services.json b/consul/files/services.json index 7899c9a..4ee6075 100644 --- a/consul/files/services.json +++ b/consul/files/services.json @@ -1,7 +1,7 @@ {% from "consul/map.jinja" import consul with context %} { "services": [ - {% for service in consul.register.items() %} + {% for service in consul.register %} { {% for key, value in service.items() %} {% if key == 'script' %} diff --git a/consul/init.sls b/consul/init.sls index 64f2772..85621c9 100644 --- a/consul/init.sls +++ b/consul/init.sls @@ -71,6 +71,12 @@ consul_data_dir: - user: consul - group: consul +consul_script_dir: + file.directory: + - name: /opt/consul/scripts + - user: consul + - group: consul + consul_config: file.managed: - source: salt://consul/files/config.json