2021-05-21 12:29:37 +08:00
|
|
|
---
|
|
|
|
- name: Create Consul service definition
|
|
|
|
include_role: name=consul-service
|
|
|
|
vars:
|
|
|
|
consul_config_name: '{{ matterbridge_cont_name }}'
|
|
|
|
consul_services:
|
|
|
|
- name: '{{ matterbridge_cont_name }}'
|
|
|
|
tags: ['matterbridge', 'bridge']
|
|
|
|
checks:
|
|
|
|
- id: '{{ matterbridge_cont_name }}-status'
|
|
|
|
name: 'MatterBridge health'
|
|
|
|
type: 'script'
|
|
|
|
script: '/usr/bin/pgrep -xl matterbridge'
|
2021-07-29 15:11:26 +08:00
|
|
|
|
|
|
|
- name: Create Consul service definition for API
|
|
|
|
include_role: name=consul-service
|
|
|
|
when: '{{ matterbridge_api_enabled }}'
|
|
|
|
vars:
|
|
|
|
consul_config_name: '{{ matterbridge_cont_name }}-api'
|
|
|
|
consul_services:
|
|
|
|
- name: '{{ matterbridge_cont_name }}-api'
|
|
|
|
tags: ['matterbridge', 'bridge']
|
|
|
|
checks:
|
|
|
|
- id: '{{ matterbridge_cont_name }}-api-health'
|
|
|
|
name: 'MatterBridge API health'
|
|
|
|
type: 'script'
|
|
|
|
script: 'curl --fail http://localhost:{{ matterbridge_api_port }}/api/health'
|