-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcleanup_ethereum.yaml
89 lines (89 loc) · 2.71 KB
/
cleanup_ethereum.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
- hosts: all, !localhost
serial: "{{ batch_count | default('100%') }}"
become: true
tasks:
#- name:
# ansible.builtin.pause:
# prompt: |+
# =========================================================
# !!!!!!!!! WARNING !!!!!!!!!
# =========================================================
# You're about to cleanup all data on the following nodes:
# {% for host in ansible_play_hosts_all | sort %}
# - {{ host }}
# {% endfor %}
# =========================================================
# Are you sure you want to continue? (yes/no)
# register: prompt
- name: Cleanup all data
#when: prompt.user_input == "yes"
block:
- name: Remove eth containers
community.docker.docker_container:
name: "{{ item }}"
state: absent
timeout: 5
loop:
# Execution layer clients
- "besu"
- "erigon-init"
- "erigon"
- "ethereumjs"
- "geth-init"
- "geth"
- "nethermind"
- "reth"
- "execution"
- "execution-init"
- "nimbusel"
# Consensus layer clients
- "lighthouse-validator"
- "lighthouse"
- "lodestar-validator"
- "lodestar"
- "nimbus"
- "prysm-validator"
- "prysm"
- "teku-validator"
- "teku"
- "grandine"
- "beacon"
- "validator"
- "grandine"
# Others
- "ethereum-metrics-exporter"
- "snooper-engine"
- "snooper-rpc"
- "cl-bootnode"
- "mev-boost"
- "external-block-builder"
- name: Remove data dirs
file:
state: absent
path: "{{ item }}"
loop:
# Execution layer data
- /data/besu
- /data/erigon
- /data/ethereumjs
- /data/geth
- /data/nethermind
- /data/reth
- /data/nimbusel
# Consensus layer data
- /data/lighthouse
- /data/lighthouse-validator
- /data/lodestar
- /data/lodestar-validator
- /data/nimbus
- /data/nimbus-validator
- /data/prysm
- /data/prysm-validator
- /data/teku
- /data/teku-validator
- /data/grandine
- /data/grandine-validator
# Config files
- /data/ethereum-network-config
- /data/execution-auth.secret
- /data/cl-bootnode