add ageth wrapper for managing geth

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-03-20 09:59:51 +01:00
parent a98ea99095
commit bf6c9b76f0
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
6 changed files with 26 additions and 0 deletions

View File

@ -1,4 +1,5 @@
---
- import_tasks: wrapper.yml
- import_tasks: geth.yml
- import_tasks: faucet.yml
- import_tasks: proxy.yml

View File

@ -0,0 +1,6 @@
---
- name: Create geth attach wrapper
template:
src: geth-attach-wrapper.sh
dest: /usr/local/bin/ageth
mode: 0755

View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
if [[ -z "$@" ]]; then
docker exec -it {{ faucet_geth_name }} geth attach http://localhost:{{ faucet_geth_rpc_port }}
else
docker exec -it {{ faucet_geth_name }} geth attach http://localhost:{{ faucet_geth_rpc_port }} --exec "$@"
fi

View File

@ -1,5 +1,6 @@
---
- import_tasks: config.yml
- import_tasks: wrapper.yml
- import_tasks: container.yml
- import_tasks: firewall.yml
- import_tasks: consul.yml

View File

@ -0,0 +1,6 @@
---
- name: Create geth attach wrapper
template:
src: geth-attach-wrapper.sh
dest: /usr/local/bin/ageth
mode: 0755

View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
if [[ -z "$@" ]]; then
docker exec -it {{ miner_cont_name }} geth attach http://localhost:{{ miner_rpc_port }}
else
docker exec -it {{ miner_cont_name }} geth attach http://localhost:{{ miner_rpc_port }} --exec "$@"
fi