mirror of
https://github.com/status-im/infra-faucet.git
synced 2025-02-24 08:38:32 +00:00
add unused for now veriy step
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
8fc95fd208
commit
19e8027f7c
@ -4,11 +4,11 @@
|
||||
vars:
|
||||
consul_config_name: '{{ miner_cont_name | replace("-", "_") }}'
|
||||
consul_services:
|
||||
- id: '{{ miner_cont_name }}'
|
||||
name: '{{ miner_cont_name }}'
|
||||
- name: '{{ miner_cont_name }}'
|
||||
tags: ['{{ env }}.{{ stage }}', 'geth', 'miner', 'faucet']
|
||||
port: '{{ miner_main_port }}'
|
||||
tags: ['{{ env }}.{{ stage }}', 'geth', 'miner']
|
||||
checks:
|
||||
- id: geth-miner-rpc-health
|
||||
name: Geth Miner RPC Health
|
||||
type: script
|
||||
script: 'curl -s -X POST -H Content-type:application/json --data {"jsonrpc":"2.0","method":"admin_nodeInfo","params":[],"id":1} http://localhost:{{ miner_rpc_port }}/'
|
||||
|
31
ansible/roles/geth-miner/tasks/verify.yml
Normal file
31
ansible/roles/geth-miner/tasks/verify.yml
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
- name: Get account wallet state
|
||||
docker_container:
|
||||
name: 'geth-account-verify'
|
||||
image: '{{ miner_cont_image }}'
|
||||
user: root
|
||||
pull: true
|
||||
detach: false
|
||||
interactive: true
|
||||
command: |
|
||||
--datadir=/data
|
||||
--password=/data/faucet.pass
|
||||
--networkid={{ miner_network_id }}
|
||||
--verbosity=1
|
||||
console
|
||||
--exec=personal.listWallets
|
||||
volumes:
|
||||
- '{{ miner_cont_vol }}/data:/data:rw'
|
||||
register: geth_wallets
|
||||
|
||||
- debug: msg={{geth_wallets}}
|
||||
|
||||
- name: Extract wallet state
|
||||
set_fact:
|
||||
wallet_state: '{{ geth_wallets.stdout | from_json | json_query(".[0].status") }}'
|
||||
|
||||
- name: Verify the account wallet can be unlocked
|
||||
assert:
|
||||
that:
|
||||
- '{{ wallet_state == "Unlocked" }}'
|
||||
msg: 'Wallet state must be unlocked!'
|
Loading…
x
Reference in New Issue
Block a user