nim-waku-bridge: add missing enode extraction

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-03-10 17:45:51 +01:00
parent b2142fd80b
commit 74f5ff8b23
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
2 changed files with 32 additions and 0 deletions

View File

@ -1,3 +1,4 @@
---
- import_tasks: docker.yml
- import_tasks: query.yml
- import_tasks: consul.yml

View File

@ -0,0 +1,31 @@
---
- name: 'Wait for RPC port to be available'
wait_for:
port: '{{ nim_waku_bridge_rpc_tcp_port }}'
delay: 5
- name: 'Extract address of the node for Consul'
uri:
url: 'http://localhost:{{ nim_waku_bridge_rpc_tcp_port }}/'
method: POST
body:
method: 'get_waku_v2_debug_v1_info'
params: []
jsonrpc: '2.0'
id: 1
status_code: 200
body_format: json
register: waku_info
ignore_errors: true
- name: Verify we got the node address
assert:
that: 'waku_info.json.result.listenAddresses is defined'
fail_msg: 'Did not receive Nim-Waku node address!'
quiet: true
- name: Extract LibP2P TCP address from list
set_fact:
nim_waku_bridge_libp2p_multiaddr: |-
{{ waku_info.json.result.listenAddresses
| reject("contains", "/ws") | first }}