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
/
Copy pathstop-and-update.yaml
81 lines (69 loc) · 2.37 KB
/
stop-and-update.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
---
- hosts: stereumnodes
vars_files:
- /etc/stereum/ethereum2.yaml
tasks:
- name: Overrule version tag if available
set_fact:
update:
in_progress: "{{ update.in_progress }}"
lane: "{{ update.lane }}"
available: "{{ stereum_version_tag_override }}"
unattended:
check: "{{ update.unattended.check }}"
install: "{{ update.unattended.install }}"
when: stereum_version_tag_override is defined
- name: Check if update is available
fail:
msg: "No update available!"
when: update.available is none or update.available | length < 2
- name: Check if update is running
fail:
msg: "Update in progress!"
when: update.in_progress is not none and update.in_progress | length > 0
- name: Copy wallet password to temp file
ansible.builtin.copy:
src: "{{ e2dc_install_path }}/data/prysm/validator/passwords/wallet-password"
dest: /etc/stereum/prysm-wallet-password.tmp
become: yes
when: setup == "prysm"
- name: Set update in progress
lineinfile:
path: "/etc/stereum/ethereum2.yaml"
regexp: '^\s{2}in_progress:.*'
line: " in_progress: {{ update.available }}"
become: yes
- import_role:
name: stop-services
ignore_errors: true
- import_role:
name: git-checkout-tag
vars:
git_checkout_tag_git_repo_path: "{{ e2a_install_path }}"
git_update_pull_tag: "{{ update.available }}"
skip_stashing: false
- import_role:
name: git-checkout-tag
vars:
git_checkout_tag_git_repo_path: "{{ e2ccc_install_path }}"
git_update_pull_tag: "{{ update.available }}"
skip_stashing: false
- import_role:
name: git-checkout-tag
vars:
git_checkout_tag_git_repo_path: "{{ e2dc_install_path }}"
git_update_pull_tag: "{{ network }}-{{ update.available }}"
skip_stashing: false
- name: Set version tag to new version
lineinfile:
path: "/etc/stereum/ethereum2.yaml"
regexp: '^stereum_version_tag:.*'
line: "stereum_version_tag: {{ update.available }}"
become: yes
- name: Remove available update
lineinfile:
path: "/etc/stereum/ethereum2.yaml"
regexp: '^\s{2}available:.*'
line: " available:"
become: yes
# EOF