summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/server/tasks
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-10-27 23:30:04 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-10-27 23:30:04 +0200
commit187894ff0d651f0f9924df9a40bc1085f4172612 (patch)
treeb8493c7f811f01e760b0d7b40c17bcef41017a62 /roles/monitoring/prometheus/server/tasks
parentadd basic auth to prometheus/server (diff)
prometheus add basic auth to alert-manager
Diffstat (limited to 'roles/monitoring/prometheus/server/tasks')
-rw-r--r--roles/monitoring/prometheus/server/tasks/main.yml11
1 files changed, 11 insertions, 0 deletions
diff --git a/roles/monitoring/prometheus/server/tasks/main.yml b/roles/monitoring/prometheus/server/tasks/main.yml
index f5965883..b2e5f0eb 100644
--- a/roles/monitoring/prometheus/server/tasks/main.yml
+++ b/roles/monitoring/prometheus/server/tasks/main.yml
@@ -111,6 +111,17 @@
validate: "promtool check web-config %s"
notify: reload prometheus
+- name: generate password file prometheus server to access alertmanager
+ when: "'basic_auth' in prometheus_server_alertmanager"
+ copy:
+ content: "{{ prometheus_server_alertmanager.basic_auth.password }}\n"
+ dest: /etc/prometheus/prometheus-alertmanager.password
+ mode: 0640
+ owner: root
+ group: prometheus
+ no_log: yes
+ notify: reload prometheus
+
- name: generate systemd service unit
template:
src: prometheus.service.j2