mirror of
https://gitlab.com/s3lph/ansible-collection-prometheus
synced 2024-11-22 17:51:01 +01:00
31 lines
746 B
YAML
31 lines
746 B
YAML
|
---
|
||
|
|
||
|
- name: render alertmanager runtime arguments
|
||
|
lineinfile:
|
||
|
path: /etc/default/prometheus-alertmanager
|
||
|
regexp: "^ARGS=.*$"
|
||
|
line: >-
|
||
|
ARGS="{{ alertmanager_arguments }}"
|
||
|
insertbefore: BOF
|
||
|
notify: restart alertmanager
|
||
|
|
||
|
- name: render alertmanager config template
|
||
|
template:
|
||
|
src: alertmanager.yml.j2
|
||
|
dest: /etc/prometheus/alertmanager.yml
|
||
|
owner: root
|
||
|
group: prometheus
|
||
|
mode: 0640
|
||
|
validate: /usr/bin/amtool check-config %s
|
||
|
notify: reload alertmanager
|
||
|
|
||
|
- name: render alertmanager notification templates
|
||
|
copy:
|
||
|
content: "{{ item.content }}"
|
||
|
dest: "{{ item.path }}"
|
||
|
owner: root
|
||
|
group: prometheus
|
||
|
mode: 0640
|
||
|
loop: "{{ notification_templates }}"
|
||
|
notify: reload alertmanager
|