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

23 lines
536 B
Text

{% from "prometheus/map.jinja" import alertmanager with context %}
{%- if alertmanager.enabled %}
{%- if pillar.docker is defined and pillar.docker.host is defined %}
{{alertmanager.dir.config}}:
file.directory:
- makedirs: True
{{alertmanager.dir.data}}:
file.directory:
- makedirs: True
- mode: 755
{{alertmanager.dir.config}}/alertmanager.yml:
file.managed:
- source: salt://prometheus/files/alertmanager.yml
- template: jinja
- require:
- file: {{alertmanager.dir.config}}
{%- endif %}
{%- endif %}