diff options
author | Christian Pointner <equinox@spreadspace.org> | 2021-10-27 23:54:16 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2021-10-27 23:54:16 +0200 |
commit | 152652bf3df22bd4687012e3b372cd00760bf1cd (patch) | |
tree | 6a1b984f8d0c835b87403b02115d98a6c54a20ac /roles/monitoring/prometheus/server/tasks | |
parent | prometheus add basic auth to alert-manager (diff) |
restore promethues self-scraping if auth is used
Diffstat (limited to 'roles/monitoring/prometheus/server/tasks')
-rw-r--r-- | roles/monitoring/prometheus/server/tasks/main.yml | 11 |
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 b2e5f0eb..4b1bf2c4 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 scrape itself + when: prometheus_server_selfscraping_auth is defined + copy: + content: "{{ prometheus_server_selfscraping_auth.password }}\n" + dest: /etc/prometheus/prometheus-selfscraping.password + mode: 0640 + owner: root + group: prometheus + no_log: yes + notify: reload prometheus + - name: generate password file prometheus server to access alertmanager when: "'basic_auth' in prometheus_server_alertmanager" copy: |