2019-04-26 09:54:14 +00:00
|
|
|
---
|
|
|
|
- name: Geth | Wait for JSON RPC port to respond
|
|
|
|
wait_for:
|
|
|
|
host: 'localhost'
|
|
|
|
port: '{{ geth_rpc_port }}'
|
|
|
|
delay: 5
|
2021-03-25 11:16:43 +00:00
|
|
|
connect_timeout: 10
|
2019-04-26 09:54:14 +00:00
|
|
|
state: drained
|
|
|
|
|
|
|
|
- name: Geth | Get enode address
|
|
|
|
uri:
|
2021-04-29 12:56:39 +00:00
|
|
|
url: http://{{ geth_rpc_addr }}:{{ geth_rpc_port }}/
|
2019-04-26 09:54:14 +00:00
|
|
|
method: POST
|
|
|
|
body: '{"id": 1, "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:
|
|
|
|
mode: 0644
|