22 lines
729 B
YAML
22 lines
729 B
YAML
---
|
|
- name: Create Consul service definition
|
|
include_role: name=infra-role-consul-service
|
|
vars:
|
|
consul_config_name: '{{ alertmanager_service_name }}'
|
|
consul_services:
|
|
- name: '{{ alertmanager_service_name }}'
|
|
tags: ['metrics', 'alertmanager']
|
|
port: '{{ alertmanager_webui_port }}'
|
|
address: '{{ ansible_local.wireguard.vpn_ip }}'
|
|
checks:
|
|
- id: '{{ alertmanager_service_name }}-health'
|
|
name: 'Alert Manager Health'
|
|
type: 'http'
|
|
http: 'http://localhost:{{ alertmanager_webui_port }}/api/v1/receivers'
|
|
|
|
# We need to do this for discover step to work
|
|
- name: Reload Consul right away
|
|
systemd:
|
|
name: 'consul'
|
|
state: 'reloaded'
|