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 }} - source: {{ script.source }}
- name: {{ script.name }} - name: {{ script.name }}
- template: jinja - template: jinja
- context: {{ script.get('context', {}) | yaml }}
- user: consul - user: consul
- group: consul - group: consul
- mode: 0755 - mode: 0755

View file

@ -26,6 +26,8 @@ consul:
scripts: scripts:
- source: salt://files/consul/check_redis.py - source: salt://files/consul/check_redis.py
name: /usr/local/share/consul/check_redis.py name: /usr/local/share/consul/check_redis.py
context:
port: 6379
consul_template: consul_template:
# Start consul-template daemon and enable it at boot time # Start consul-template daemon and enable it at boot time