infra-role-geth/tasks/save_enode.yml
Jakub Sokołowski cd4fd64035
save_enode: increase wait time for RPC port
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-05-10 00:29:46 +02:00

28 lines
663 B
YAML

---
- name: Geth | Wait for JSON RPC port to respond
wait_for:
host: 'localhost'
port: '{{ geth_rpc_port }}'
delay: 60
sleep: 30
connect_timeout: 5
timeout: 1200
state: drained
- name: Geth | Get enode address
uri:
url: http://{{ geth_rpc_addr }}:{{ geth_rpc_port }}/
method: POST
body: '{"id": 1, "jsonrpc": "2.0", "method": "admin_nodeInfo"}'
body_format: json
return_content: yes
register: node_info
- name: 'Geth | Save enode address: {{ geth_enode_file }}'
copy:
dest: '{{ geth_enode_file }}'
content: '{{ node_info.json.result.enode }}'
owner: dockremap
group: docker
mode: 0644