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