From 5f65cfeefe30ad419b73056b7d4d75ea6e251f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Fri, 3 Jun 2022 11:16:07 +0200 Subject: [PATCH] consul: fix ids and names to be more consistent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- defaults/main.yml | 1 + tasks/consul.yml | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 125acfe..53aef88 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -107,6 +107,7 @@ geth_public_addr: '{{ ansible_host }}' # Consul config geth_consul_enabled: true +geth_consul_service_name: 'geth' geth_consul_default_tags: - geth - '{{ env }}.{{ stage }}' diff --git a/tasks/consul.yml b/tasks/consul.yml index f7e3601..b88dda1 100644 --- a/tasks/consul.yml +++ b/tasks/consul.yml @@ -2,7 +2,8 @@ - name: Geth | Consul | Define services set_fact: consul_services: - - name: '{{ geth_cont_name }}' + - id: '{{ geth_cont_name }}' + name: '{{ geth_consul_service_name }}' tags: '{{ geth_consul_tags }}' port: '{{ geth_port }}' address: '{{ ansible_host }}' @@ -14,7 +15,8 @@ type: tcp tcp: '127.0.0.1:{{ geth_port }}' - - name: '{{ geth_cont_name }}-rpc' + - id: '{{ geth_cont_name }}-rpc' + name: '{{ geth_consul_service_name }}-rpc' tags: '{{ geth_consul_tags + ["rpc"] }}' port: '{{ geth_rpc_port }}' address: '{{ ansible_local.wireguard.address }}' @@ -27,7 +29,8 @@ timeout: '5s' failures_before_critical: 3 - - name: '{{ geth_cont_name }}-ws' + - id: '{{ geth_cont_name }}-ws' + name: '{{ geth_consul_service_name }}-ws' tags: '{{ geth_consul_tags + ["websocket"] }}' port: '{{ geth_websocket_port }}' address: '{{ ansible_local.wireguard.address }}'