Jakub Sokołowski 5dae92080a
get-geth-api-urls: use HTTP RPC API for unstable only
Current support for HTTP RPC API is not stable enough.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-12-03 19:40:52 +01:00

23 lines
704 B
YAML

---
- include_tasks: consul/posix.yml
when: ansible_system in ['Linux', 'Darwin']
- include_tasks: consul/windows.yml
when: ansible_system == 'Win32NT'
# On Windows json attribute is missing when it's [].
- name: Extract Geth websocket IP and port
set_fact:
geth_api_addresses: |
{{ (geth_rpc_services.results
+ geth_ws_services.results)
| selectattr("json", "defined")
| sum(attribute="json", start=[])
| map(attribute='ServiceMeta.url')
| list }}
- name: Extract Goerli Geth WebSocket URL
set_fact:
# our nodes first (will be used by default) then an infura node
beacon_node_web3_urls_all: "{{ geth_api_addresses + [ selected_infura_url ] }}"