add ageth - a wrapper script for accessing geth console

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-04-26 14:11:23 +02:00
parent 7149996e5a
commit f94a05fcd1
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
3 changed files with 13 additions and 0 deletions

View File

@ -2,6 +2,7 @@
- import_tasks: generate.yml - import_tasks: generate.yml
- import_tasks: container.yml - import_tasks: container.yml
- import_tasks: firewall.yml - import_tasks: firewall.yml
- import_tasks: wrapper.yml
- import_tasks: save_enode.yml - import_tasks: save_enode.yml
- import_tasks: consul.yml - import_tasks: consul.yml
when: geth_consul_enabled when: geth_consul_enabled

6
tasks/wrapper.yml Normal file
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 {{ geth_cont_name }} geth attach http://localhost:{{ geth_rpc_port }}
else
docker exec {{ geth_cont_name }} geth attach http://localhost:{{ geth_rpc_port }} --exec "$@"
fi