forked from InsightDataScience/ansible-playbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkafka.yml
28 lines (26 loc) · 802 Bytes
/
kafka.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
---
- name: Creating host group zookeeper from dynamic inventory
hosts: localhost
connection: local
tags: ['info', 'install', 'start', 'stop', 'uninstall']
vars:
zookeeper_tag_name: "tag_{{ zookeeper_tag | replace('-', '_') }}"
tasks:
- add_host: name={{ item }} groups=zookeeper
with_items: "{{ groups[zookeeper_tag_name] }}"
- name: Creating host group kafka from dynamic inventory
hosts: localhost
connection: local
tags: ['info', 'install', 'start', 'stop', 'uninstall']
vars:
kafka_tag_name: "tag_{{ kafka_tag | replace('-', '_') }}"
tasks:
- add_host: name={{ item }} groups=kafka
with_items: "{{ groups[kafka_tag_name] }}"
- name: Execute Kafka roles
hosts: kafka
user: ubuntu
become: true
become_method: sudo
roles:
- role: kafka