Commit 103bbdec authored by Kristian Klausen's avatar Kristian Klausen 🎉
Browse files

Split alertmanager into its own role

parent d2b110d2
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
- { role: hardening } - { role: hardening }
- { role: borg_client, tags: ["borg"], when: "'borg_clients' in group_names" } - { role: borg_client, tags: ["borg"], when: "'borg_clients' in group_names" }
- { role: prometheus } - { role: prometheus }
- { role: alertmanager }
- { role: prometheus_exporters } - { role: prometheus_exporters }
- { role: loki } - { role: loki }
- { role: promtail } - { role: promtail }
......
---
- name: reload alertmanager
service: name=alertmanager state=reloaded
---
- name: install alertmanager server
pacman: name=alertmanager state=present
- name: install alertmanager configuration
template: src=alertmanager.yml.j2 dest=/etc/alertmanager/alertmanager.yml owner=root group=alertmanager mode=640
notify: reload alertmanager
- name: enable alertmanager server service
systemd: name=alertmanager enabled=yes daemon_reload=yes state=started
...@@ -2,6 +2,3 @@ ...@@ -2,6 +2,3 @@
- name: reload prometheus - name: reload prometheus
service: name=prometheus state=reloaded service: name=prometheus state=reloaded
- name: reload alertmanager
service: name=alertmanager state=reloaded
--- ---
- name: install prometheus,alertmanager server - name: install prometheus server
pacman: name=prometheus,alertmanager state=present pacman: name=prometheus state=present
- name: install prometheus configuration - name: install prometheus configuration
template: src=prometheus.yml.j2 dest=/etc/prometheus/prometheus.yml owner=root group=root mode=644 template: src=prometheus.yml.j2 dest=/etc/prometheus/prometheus.yml owner=root group=root mode=644
...@@ -15,12 +15,5 @@ ...@@ -15,12 +15,5 @@
copy: src=node.rules.yml dest=/etc/prometheus/node.rules.yml owner=root group=root mode=644 copy: src=node.rules.yml dest=/etc/prometheus/node.rules.yml owner=root group=root mode=644
notify: reload prometheus notify: reload prometheus
- name: install alertmanager configuration
template: src=alertmanager.yml.j2 dest=/etc/alertmanager/alertmanager.yml owner=root group=alertmanager mode=640
notify: reload alertmanager
- name: enable prometheus server service - name: enable prometheus server service
systemd: name=prometheus enabled=yes daemon_reload=yes state=started systemd: name=prometheus enabled=yes daemon_reload=yes state=started
- name: enable alertmanager server service
systemd: name=alertmanager enabled=yes daemon_reload=yes state=started
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment