consul: allow customizing advertised address

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-05-24 16:45:46 +02:00
parent f2fc289263
commit 862d068c73
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
2 changed files with 7 additions and 6 deletions

View File

@ -117,6 +117,7 @@ geth_public_addr: '{{ ansible_host }}'
# Consul config
geth_consul_enabled: true
geth_consul_service_name: 'geth-{{ geth_network_name }}'
geth_consul_advertised_address: '{{ ansible_local.wireguard.address }}'
geth_consul_scope: 'main'
geth_consul_default_tags:
- 'geth'

View File

@ -21,10 +21,10 @@
name: '{{ geth_consul_service_name }}-rpc'
tags: '{{ geth_consul_tags + ["rpc"] }}'
port: '{{ geth_rpc_port }}'
address: '{{ ansible_local.wireguard.address }}'
address: '{{ geth_consul_advertised_address }}'
disabled: '{{ not geth_rpc_enabled }}'
meta:
url: 'http://{{ ansible_local.wireguard.address }}:{{ geth_rpc_port }}'
url: 'http://{{ geth_consul_advertised_address }}:{{ geth_rpc_port }}'
checks:
- id: '{{ geth_cont_name }}-rpc-status'
type: 'script'
@ -36,10 +36,10 @@
name: '{{ geth_consul_service_name }}-authrpc'
tags: '{{ geth_consul_tags + ["authrpc", "engine"] }}'
port: '{{ geth_authrpc_port }}'
address: '{{ ansible_local.wireguard.address }}'
address: '{{ geth_consul_advertised_address }}'
disabled: '{{ not geth_authrpc_enabled }}'
meta:
url: 'http://{{ ansible_local.wireguard.address }}:{{ geth_authrpc_port }}'
url: 'http://{{ geth_consul_advertised_address }}:{{ geth_authrpc_port }}'
checks:
- id: '{{ geth_cont_name }}-authrpc-status'
type: 'tcp'
@ -50,10 +50,10 @@
name: '{{ geth_consul_service_name }}-ws'
tags: '{{ geth_consul_tags + ["websocket"] }}'
port: '{{ geth_websocket_port }}'
address: '{{ ansible_local.wireguard.address }}'
address: '{{ geth_consul_advertised_address }}'
disabled: '{{ not geth_websocket_enabled }}'
meta:
url: 'ws://{{ ansible_local.wireguard.address }}:{{ geth_websocket_port }}'
url: 'ws://{{ geth_consul_advertised_address }}:{{ geth_websocket_port }}'
checks:
- id: '{{ geth_cont_name }}-ws-status'
name: 'Geth WebSocket API'