consul: make WebSocket optional in Consul services
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
2689c6ccae
commit
e7cef83dd8
|
@ -1,8 +1,6 @@
|
|||
---
|
||||
- name: Geth | Create Consul service definition
|
||||
include_role: name=consul-service
|
||||
vars:
|
||||
consul_config_name: '{{ geth_cont_name }}'
|
||||
- name: Geth | Consul | Define services
|
||||
set_fact:
|
||||
consul_services:
|
||||
- name: '{{ geth_cont_name }}'
|
||||
tags: '{{ geth_consul_tags }}'
|
||||
|
@ -41,3 +39,14 @@
|
|||
type: 'tcp'
|
||||
tcp: 'localhost:{{ geth_websocket_port }}'
|
||||
failures_before_critical: 3
|
||||
|
||||
- name: Geth | Consul | Remove WebSocket service
|
||||
set_fact:
|
||||
consul_services: |
|
||||
{{ consul_services | rejectattr('name', 'match', '.*-ws$') | list }}
|
||||
when: not geth_websocket_enabled
|
||||
|
||||
- name: Geth | Consul | Create service definition
|
||||
include_role: name=consul-service
|
||||
vars:
|
||||
consul_config_name: '{{ geth_cont_name }}'
|
||||
|
|
Loading…
Reference in New Issue