master.yml 1.13 KB
Newer Older
1
---
2
3
4
5
6
  - name: Install Apache kafka.
    include: install.yml

  - name: Copy Apache Zookeeper init script.
    template: src=zookeeper-init.j2 dest=/etc/init.d/zookeeper-init owner=root group=root mode=0755
7

8
  - name: Configure Apache kafka.
9
    copy: src=server.properties dest="{{ installation_path }}/kafka/config/server.properties" owner=root group=root mode=0644
10
11
12
13
    tags:
      - configure-kafka

  - name: Start Apache Zookeeper server.
14
    shell: /etc/init.d/zookeeper-init start # Should use ansible module service: name=zookeeper-init state=started when the bug in version 1.9.1 is fixed.
15
16
17
18
19
20
21
22
23
    tags:
      - start-zookeeper

  - name: Wait for Apache Zookeeper to become available.
    wait_for: port=2181
    tags:
      - start-zookeeper

  - name: Start Apache Kafka server.
24
    shell: /etc/init.d/kafka-init start # Should use ansible module service: name=zookeeper-init state=started when the bug in version 1.9.1 is fixed.
25
26
27
28
29
30
31
32
33
34
35
    tags:
      - start-kafka

  - name: Wait for Apache Kafka server to become available.
    wait_for: port=9092 timeout=30
    changed_when: true
    notify:
      - create topics
    tags:
      - start-kafka