2021-10-12 11:52:13 +00:00
|
|
|
---
|
|
|
|
- name: Find available data centers
|
|
|
|
uri:
|
|
|
|
url: '{{ consul_catalog_url }}/datacenters'
|
|
|
|
register: data_centers
|
|
|
|
|
2022-08-11 17:23:41 +00:00
|
|
|
- name: Find available Geth API Auth RPC services
|
2021-10-12 11:52:13 +00:00
|
|
|
uri:
|
2022-08-11 17:23:41 +00:00
|
|
|
url: '{{ consul_catalog_url }}/service/{{ service_name }}-authrpc?dc={{ item }}&tag={{ geth_node_api_fleet_name }}'
|
2021-12-03 18:40:52 +00:00
|
|
|
with_items: '{{ data_centers.json }}'
|
|
|
|
register: geth_rpc_services
|
|
|
|
|
2022-06-03 10:01:44 +00:00
|
|
|
# On Windows json attribute is missing when it's [].
|
|
|
|
- name: Extract Geth websocket IP and port
|
|
|
|
set_fact:
|
2022-09-15 12:30:30 +00:00
|
|
|
beacon_node_web3_urls_all: |
|
|
|
|
{{ geth_rpc_services.results
|
2022-06-03 10:01:44 +00:00
|
|
|
| sum(attribute="json", start=[])
|
2022-08-11 17:23:41 +00:00
|
|
|
| map(attribute="ServiceMeta.url")
|
2022-06-03 10:01:44 +00:00
|
|
|
| list }}
|