diff options
Diffstat (limited to 'roles/monitoring/prometheus/alertmanager')
-rw-r--r-- | roles/monitoring/prometheus/alertmanager/defaults/main.yml | 5 | ||||
-rw-r--r-- | roles/monitoring/prometheus/alertmanager/tasks/main.yml | 13 |
2 files changed, 17 insertions, 1 deletions
diff --git a/roles/monitoring/prometheus/alertmanager/defaults/main.yml b/roles/monitoring/prometheus/alertmanager/defaults/main.yml index 86cd9aa5..ac4f7600 100644 --- a/roles/monitoring/prometheus/alertmanager/defaults/main.yml +++ b/roles/monitoring/prometheus/alertmanager/defaults/main.yml @@ -21,5 +21,8 @@ prometheus_alertmanager_route: prometheus_alertmanager_receivers: - name: empty -# prometheus_server_auth_users: +# prometheus_alertmanager_auth_users: # admin: geheim + +# prometheus_alertmanager_password_files: +# user: secret diff --git a/roles/monitoring/prometheus/alertmanager/tasks/main.yml b/roles/monitoring/prometheus/alertmanager/tasks/main.yml index 338b0cbe..173ea758 100644 --- a/roles/monitoring/prometheus/alertmanager/tasks/main.yml +++ b/roles/monitoring/prometheus/alertmanager/tasks/main.yml @@ -47,6 +47,19 @@ group: prometheus-alertmanager notify: reload prometheus-alertmanager +- name: generate password files + when: prometheus_alertmanager_password_files is defined + loop: "{{ prometheus_alertmanager_password_files | dict2items }}" + loop_control: + label: "{{ item.key }}" + copy: + content: "{{ item.value }}" + dest: "/etc/prometheus/alertmanager-{{ item.key }}.password" + mode: 0640 + owner: root + group: prometheus-alertmanager + notify: reload prometheus-alertmanager + - name: generate systemd service unit template: src: prometheus-alertmanager.service.j2 |