forked from confluentinc/cp-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzookeeper.yml
71 lines (62 loc) · 1.87 KB
/
zookeeper.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
60
61
62
63
64
65
66
67
68
69
70
71
---
- name: Zookeeper Status Finding
hosts: zookeeper
gather_facts: false
tags: zookeeper
environment: "{{ proxy_env }}"
tasks:
- import_role:
name: confluent.variables
- name: Populate service facts
service_facts:
- name: Determine Installation Pattern - Parallel or Serial
set_fact:
install_pattern: "{{ 'parallel' if service_state != 'running' or zookeeper_deployment_strategy == 'parallel' else 'serial' }}"
vars:
service_state: "{{ ansible_facts.services[zookeeper_service_name + '.service'].state | default('unknown') }}"
- name: Group Hosts by Installation Pattern
group_by:
key: zookeeper_{{install_pattern}}
changed_when: false
- name: Zookeeper Parallel Provisioning
hosts: zookeeper_parallel
gather_facts: false
tags: zookeeper
environment: "{{ proxy_env }}"
tasks:
- import_role:
name: confluent.zookeeper
- name: Zookeeper Serial Ordering
hosts: zookeeper_serial
gather_facts: false
tags: zookeeper
environment: "{{ proxy_env }}"
tasks:
- import_role:
name: confluent.zookeeper
tasks_from: dynamic_groups.yml
- name: Zookeeper Followers Provisioning
hosts: zookeeper_follower
serial: 1
gather_facts: false
tags: zookeeper
environment: "{{ proxy_env }}"
tasks:
- import_role:
name: confluent.zookeeper
- name: Proceed Prompt
pause:
prompt: "Press Enter to Proceed to Next Node. Ctrl + C to Abort"
when: zookeeper_pause_rolling_deployment|bool
- name: Zookeeper Leader Provisioning
hosts: zookeeper_leader
gather_facts: false
tags: zookeeper
environment: "{{ proxy_env }}"
tasks:
- import_role:
name: confluent.zookeeper
- name: Proceed Prompt
pause:
prompt: "Press Enter to Proceed to Next Node. Ctrl + C to Abort"
when: zookeeper_pause_rolling_deployment|bool