forked from confluentinc/cp-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ksql.yml
47 lines (41 loc) · 1.21 KB
/
ksql.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
---
- name: KSQL Status Finding
hosts: ksql
gather_facts: false
tags: ksql
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 ksql_deployment_strategy == 'parallel' else 'serial' }}"
vars:
service_state: "{{ ansible_facts.services[ksql_service_name + '.service'].state | default('unknown') }}"
- name: Group Hosts by Installation Pattern
group_by:
key: ksql_{{install_pattern}}
changed_when: false
- name: KSQL Parallel Provisioning
hosts: ksql_parallel
gather_facts: false
tags: ksql
environment: "{{ proxy_env }}"
tasks:
- import_role:
name: confluent.ksql
- name: KSQL Serial Provisioning
hosts: ksql_serial
serial: 1
gather_facts: false
tags: ksql
environment: "{{ proxy_env }}"
tasks:
- import_role:
name: confluent.ksql
- name: Proceed Prompt
pause:
prompt: "Press Enter to Proceed to Next Node. Ctrl + C to Abort"
when: ksql_pause_rolling_deployment|bool