03b9839f0a
* Providing for upstart in consul-template service * typo
25 lines
813 B
Text
25 lines
813 B
Text
{% from "consul-template/map.jinja" import consul_template with context %}
|
|
|
|
consul-template-init-script:
|
|
file.managed:
|
|
{% if salt['test.provider']('service') == 'systemd' %}
|
|
- source: salt://consul-template/files/consul-template.service
|
|
- name: /etc/systemd/system/consul-template.service
|
|
- mode: 0644
|
|
{% elif salt['test.provider']('service') == 'upstart' %}
|
|
- source: salt://consul-template/files/consul-template-upstart.service
|
|
- name: /etc/init/consul-template.conf
|
|
- mode: 0644
|
|
{% endif %}
|
|
{% if consul_template.service != False %}
|
|
- watch_in:
|
|
- service: consul
|
|
{% endif %}
|
|
|
|
{% if consul_template.service != False %}
|
|
consul-template-service:
|
|
service.running:
|
|
- name: consul-template
|
|
- watch:
|
|
- file: /etc/consul-template.d/*
|
|
{% endif %}
|