salt-states/containers/alertmanager.sls

27 lines
614 B
Plaintext
Raw Permalink Normal View History

2023-06-27 07:16:37 +00:00
{% from 'lib.sls' import container_deploy with context %}
Create alertmanager config directory:
file.recurse:
- name: /etc/alertmanager
- source: salt://containers/files/alertmanager
- user: nobody
- group: root
- dir_mode: "0755"
- file_mode: "0644"
Create prometheus data directory:
file.directory:
- name: /srv/alertmanager
- user: nobody
- group: nobody
- mode: "0755"
{{ container_deploy('alertmanager') }}
Start prometheus service:
service.running:
- name: alertmanager
- enable: True
- watch:
- file: Create alertmanager config directory