-
Notifications
You must be signed in to change notification settings - Fork 25
/
clusterUpgrade.yml
56 lines (49 loc) · 1.3 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
---
- hosts: clusterNodes:clusterAddNodes
gather_facts: true
become: true
roles:
- java
- common
- hosts: clusterNodes:clusterAddNodes
gather_facts: true
become: true
tasks:
- name: installing latest version of kafka
ansible.builtin.import_role:
name: install
tasks_from: download
- name: configuring latest kafka version
ansible.builtin.import_role:
name: configure
- hosts: localhost
become: false
gather_facts: false
tasks:
- name: Switching Kafka Version to {{ kafkaVersion }} on all nodes (Rolling fashion)
ansible.builtin.pause:
prompt: "press enter to confirm or ctrl-c to cancel"
- hosts: clusterNodes:clusterAddNodes
gather_facts: false
become: true
serial: 1
tasks:
- name: switching kafka version to {{ kafkaVersion }}
ansible.builtin.import_role:
name: install
tasks_from: createSymlink
- name: restarting all nodes
ansible.builtin.import_role:
name: serviceState
vars:
serviceName: kafka
serviceState: restarted
- name: kafka Port Status
ansible.builtin.include_role:
name: portCheck
vars:
portNumber: "{{ item }}"
portStatus: started
loop:
- "{{ kafkaPort }}"
- "{{ kafkaJmxPort }}"