formula-prometheus/prometheus/server.sls
Bartosz Kupidura 45d0bb8fe7 Remove hardcoded username
Change-Id: I3103dc4c174be7b8c199508b0b53941e687012bf
Depends-On: Ib4c218af6e880963cadff807246d65ff68ddf5e1
2017-06-19 14:54:45 +02:00

30 lines
661 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}}:
file.directory:
- makedirs: True
{{server.dir.data}}:
file.directory:
- makedirs: True
- mode: 755
{{server.dir.config}}/prometheus.yml:
file.managed:
- source: salt://prometheus/files/prometheus.yml
- template: jinja
- require:
- file: {{server.dir.config}}
{{server.dir.config}}/alerts.yml:
file.managed:
- source: salt://prometheus/files/alerts.yml
- template: jinja
- require:
- file: {{server.dir.config}}
{%- endif %}
{%- endif %}