nucypher/deploy/ansible/geth/wipe_chaindata.yml

43 lines
1.0 KiB
YAML

---
- name: "Reset Geth Nodes"
hosts: "{{ 'tag_Role_' + lookup('env', 'NUCYPHER_NETWORK_NAME') + '_miners' }}"
user: ubuntu
gather_facts: false
pre_tasks:
- name: "Install Python2.7 for Ansible Control"
raw: sudo apt -y update && sudo apt install -y python2.7-minimal python2.7-setuptools
tasks:
- name: "Stop Geth Node Service"
become: yes
become_flags: "-H -S"
systemd:
daemon_reload: yes
no_block: yes
enabled: yes
state: stopped
name: "geth_miner"
- name: "Destroy Custom Blockchain Data Directory"
become: yes
become_flags: "-H -S"
file:
path: /home/ubuntu/chaindata
state: absent
mode: 0755
- name: "Destroy Standard Blockchain Data Directory"
become: yes
become_flags: "-H -S"
file:
path: /home/.ethereum/geth/chaindata
state: absent
mode: 0755
- name: "Destroy DAG"
become: yes
become_flags: "-H -S"
shell: "rm -rf /root/.ethash"