45d0bb8fe7
Change-Id: I3103dc4c174be7b8c199508b0b53941e687012bf Depends-On: Ib4c218af6e880963cadff807246d65ff68ddf5e1
23 lines
536 B
Text
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 %}
|