Merge pull request #20 from habitissimo/script-context

add context to script templates
This commit is contained in:
Ahmed M. AbouZaid 2017-11-24 00:13:15 +01:00 committed by GitHub
commit eabddbd6a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -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

View file

@ -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