From 01cf22c9f859e8105b3ed07a95e4b1bd6a117882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Fri, 5 May 2023 19:21:49 +0200 Subject: [PATCH] get-geth-api-urls: rename variables for clarity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ansible/group_vars/nimbus.mainnet.yml | 5 +++-- ansible/roles/get-geth-api-urls/tasks/consul/posix.yml | 2 +- ansible/roles/get-geth-api-urls/tasks/consul/windows.yml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ansible/group_vars/nimbus.mainnet.yml b/ansible/group_vars/nimbus.mainnet.yml index d6b638c..374d574 100644 --- a/ansible/group_vars/nimbus.mainnet.yml +++ b/ansible/group_vars/nimbus.mainnet.yml @@ -68,11 +68,12 @@ beacon_node_light_client_data_serve: true beacon_node_light_client_data_import_mode: 'full' # Execution layer Enginer API beacon_node_exec_layer_jwt_secret: '{{ geth_authrpc_jwtsecret }}' +beacon_node_exec_layer_urls_local_geth: ['http://localhost:{{ geth_authrpc_port|string }}'] beacon_node_exec_layer_urls: |- {{ (data_center in ["he-eu-hel1", "ih-eu-mda1"]) | ternary( - ["http://localhost:"+(geth_authrpc_port|string)], - beacon_node_exec_layer_urls_all + beacon_node_exec_layer_urls_local_geth, + beacon_node_exec_layer_urls_discovered_geth ) }} # Periodic resync to save space beacon_node_resync_enabled: true diff --git a/ansible/roles/get-geth-api-urls/tasks/consul/posix.yml b/ansible/roles/get-geth-api-urls/tasks/consul/posix.yml index 528cf6e..dbbac79 100644 --- a/ansible/roles/get-geth-api-urls/tasks/consul/posix.yml +++ b/ansible/roles/get-geth-api-urls/tasks/consul/posix.yml @@ -13,7 +13,7 @@ # On Windows json attribute is missing when it's []. - name: Extract Geth websocket IP and port set_fact: - beacon_node_exec_layer_urls_all: | + beacon_node_exec_layer_urls_discovered_geth: | {{ geth_rpc_services.results | sum(attribute="json", start=[]) | map(attribute="ServiceMeta.url") diff --git a/ansible/roles/get-geth-api-urls/tasks/consul/windows.yml b/ansible/roles/get-geth-api-urls/tasks/consul/windows.yml index 361bc1b..aca5efe 100644 --- a/ansible/roles/get-geth-api-urls/tasks/consul/windows.yml +++ b/ansible/roles/get-geth-api-urls/tasks/consul/windows.yml @@ -17,7 +17,7 @@ # On Windows json attribute is missing when it's []. - name: Extract Geth websocket IP and port set_fact: - beacon_node_exec_layer_urls_all: | + beacon_node_exec_layer_urls_discovered_geth: | {{ geth_rpc_services.results | selectattr("json", "defined") | sum(attribute="json", start=[])