formula-prometheus/prometheus/server.sls
Filip Pytloun d92d2d7ce8 Use salt support to generate grains
Change-Id: I7cc5f00608127e0bf4df5bbd58db4cae9816a402
2017-05-09 10:23:12 +02:00

17 lines
427 B
Text

{% from "prometheus/map.jinja" import server with context %}
{%- if server.enabled %}
{%- if pillar.docker is defined and pillar.docker.host is defined %}
{{server.dir.config}}/prometheus.yml:
file.managed:
- source: salt://prometheus/files/prometheus.yml
- template: jinja
{{server.dir.config}}/alerts.yml:
file.managed:
- source: salt://prometheus/files/alerts.yml
- template: jinja
{%- endif %}
{%- endif %}