Jakub Sokołowski 13fa6ea608
get-geth-api-urls: allow specifying multiple fleets
More useful than specifying multiple servicer names.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-01-09 11:10:44 +01:00

21 lines
659 B
YAML

---
- name: Find available data centers
uri:
url: '{{ consul_catalog_url }}/datacenters'
register: data_centers
- name: Find available Geth API Auth RPC services
uri:
url: '{{ consul_catalog_url }}/service/{{ geth_node_api_consul_name }}-authrpc?dc={{ item }}&tag={{ fleet_name }}'
with_items: '{{ data_centers.json }}'
register: geth_rpc_services
# On Windows json attribute is missing when it's [].
- name: Extract Geth websocket IP and port
set_fact:
beacon_node_exec_layer_urls_discovered_geth: |
{{ geth_rpc_services.results
| sum(attribute="json", start=[])
| map(attribute="ServiceMeta.url")
| list }}