ansible-infra/roles/monitoring/tasks/alertmanager.yml

25 lines
757 B
YAML
Raw Normal View History

2020-04-13 14:46:45 +02:00
- name: Install Alertmanager
2020-04-13 15:27:39 +02:00
include_role:
2020-04-13 14:46:45 +02:00
name: cloudalchemy.alertmanager
public: yes
vars:
alertmanager_web_external_url: "http://{{ alertmanager_domain }}{{ alertmanager_web_path }}"
alertmanager_config_flags_extra:
web.route-prefix: /
alertmanager_web_listen_address: "0.0.0.0:{{ alertmanager_port }}"
- name: Configure Nginx for Alertmaneger
2020-04-13 15:27:39 +02:00
import_role:
2020-04-13 14:46:45 +02:00
name: nginx
vars:
nginx_config_file: "{{ inventory_hostname }}.d/alertmanager.conf"
nginx_server:
locations:
- path: "{{ alertmanager_web_path }}/"
basic_auth:
file: .htpasswd.alertmanager
password: "{{ alertmanager_password }}"
proxy_pass:
port: "{{ alertmanager_port }}"
path: /