This repository has been archived by the owner on Jan 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
export-config.yaml
117 lines (98 loc) · 2.94 KB
/
export-config.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
- hosts: stereumnodes
vars_files:
- /etc/stereum/ethereum2.yaml
tasks:
- name: Download age
get_url:
url: https://github.com/FiloSottile/age/releases/download/v1.0.0-rc.1/age-v1.0.0-rc.1-linux-amd64.tar.gz
dest: /tmp/age.gz
mode: '0655'
become: yes
- name: Extract '/tmp/age.gz' to '/usr/local/bin'
ansible.builtin.unarchive:
src: /tmp/age.gz
dest: /usr/local/bin
remote_src: yes
become: yes
- name: Remove '/tmp/age.gz' file
ansible.builtin.file:
path: /tmp/age.gz
state: absent
become: yes
- name: Create directory for exporting config and keystore files
ansible.builtin.file:
path: /tmp/exported-config
state: directory
become: yes
- name: Check wallet exists
find:
paths: "{{ e2dc_install_path }}/wallets/"
register: wallets
become: yes
when: setup == "multiclient"
- name: Create directory for exporting wallet and passphrases
ansible.builtin.file:
path: /tmp/exported-config/wallet
state: directory
become: yes
when: setup == "multiclient" and wallets.examined > 1
- name: Install pip, expect
apt:
update_cache: yes
name:
- python3-pip
- expect
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
- name: Install pip, expect
yum:
name:
- python3-pip
- expect
state: latest
when: ansible_distribution == "CentOS"
- name: Export config prysm
include_role:
name: export-config-prysm
when: setup == "prysm"
- name: Export config lodestar
include_role:
name: export-config-lodestar
when: setup == "lodestar"
- name: Export config lighthouse
include_role:
name: export-config-lighthouse
when: setup == "lighthouse"
- name: Export config nimbus
include_role:
name: export-config-nimbus
when: setup == "nimbus"
- name: Export config teku
include_role:
name: export-config-teku
when: setup == "teku"
- name: Export config multiclient
include_role:
name: export-config-multiclient
when: setup == "multiclient"
- name: Create compressed archive of exported-config directory
archive:
path: /tmp/exported-config
dest: /tmp/exported-config.zip
format: zip
become: yes
- name: Remove uncompressed exported-config directory
ansible.builtin.file:
path: /tmp/exported-config
state: absent
become: yes
- name: Set exported config zip file's permission
ansible.builtin.file:
path: /tmp/exported-config.zip
mode: '755'
become: yes
- name: INFO
debug:
msg: "You will find the exported configuration file here: '/tmp/exported-config.zip'"
become: yes
# EOF