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