infra-role-grafana/tasks/consul.yml

30 lines
1.1 KiB
YAML

---
- name: Create Consul service definition
include_role: name=consul-service
vars:
consul_config_name: '{{ grafana_service_name }}'
consul_services:
- id: '{{ grafana_service_name }}:{{ grafana_domain }}'
name: '{{ grafana_service_name }}'
tags: ['grafana', 'monitor']
port: '{{ grafana_cont_port }}'
address: '{{ ansible_local.wireguard.vpn_ip }}'
checks:
- id: '{{ grafana_service_name }}-health'
name: 'Grafana Health'
type: 'http'
http: 'http://localhost:{{ grafana_cont_port }}/api/health'
- id: '{{ grafana_service_name }}-proxy:{{ grafana_domain }}'
name: '{{ grafana_service_name }}-proxy'
tags: ['grafana', 'monitor', 'ssl-proxy-backend']
port: '{{ grafana_proxy_port }}'
address: '{{ ansible_local.wireguard.vpn_ip }}'
meta:
proxy_fqdn: '{{ grafana_domain | mandatory }}'
checks:
- id: '{{ grafana_service_name }}-proxy-health'
name: 'Grafana Proxy Health'
type: 'http'
http: 'http://localhost:{{ grafana_proxy_port }}/health'