-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathclusterUpgrade.yml
59 lines (51 loc) · 1.35 KB
/
clusterUpgrade.yml
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
---
- hosts: clusterNodes
gather_facts: true
become: true
roles:
- java
- common
- hosts: clusterNodes
gather_facts: true
become: true
tasks:
- name: installing latest version of Zookeeper
ansible.builtin.import_role:
name: install
tasks_from: download
- name: copy mtls/sasl files
ansible.builtin.import_role:
name: copyFiles
- name: configuring latest Zookeeper version
ansible.builtin.import_role:
name: configure
- hosts: localhost
become: false
gather_facts: false
tasks:
- name: Switching zookeeper Version to {{ zookeeperVersion }} on all nodes (Rolling fashion)
ansible.builtin.pause:
prompt: "Press enter to confirm or ctrl-c to cancel"
- hosts: clusterNodes
gather_facts: false
become: true
serial: 1
tasks:
- name: switching Zookeeper version to {{ zookeeperVersion }}
ansible.builtin.import_role:
name: install
tasks_from: createSymlink
- name: restarting all nodes
ansible.builtin.import_role:
name: serviceState
vars:
serviceName: zookeeper
serviceState: restarted
- name: zookeeper Port Status
ansible.builtin.include_role:
name: portCheck
vars:
PortNumber: "{{ item }}"
PortStatus: started
loop:
- "{{ zookeeperClientPort }}"