jaytaylor / ansible-kafka

Ansible Kafka role
https://galaxy.ansible.com/jaytaylor/kafka/
Other
67 stars 52 forks source link
ansible automation kafka

Ansible Kafka

Build Status Galaxy

An ansible role to install and configure kafka distributed pub/sub messaging queue clusters.

How to get it

Add to your playbooks requirements.yml:

- src: https://github.com/jaytaylor/ansible-kafka

and then run:

ansible-galaxy install -r requirements.yml --ignore-errors

Or if you just want to grab this role and start using it:

cd my-playbook-folder/roles
git clone https://github.com/jaytaylor/ansible-kafka.git
cd -

How to use it

Once the role is installed, configure it from your playbook file (e.g. playbook.yml).

Example:

    ---
    - hosts: [all]
      roles:
        - {
          role: "ansible-kafka",
          kafka_hosts: "{{ groups.kafka | list }}",
          kafka_zookeeper_hosts: "{{ zookeeper_hosts | list }}"
          kafka_version: 0.11.0.2,     # Kafka version override.
          kafka_scala_serverion: 2.10 # Scala version override.
        }

Where kafka_hosts and zookeeper_hosts are both defined variables (e.g. in group_vars/all), and contain the list of hosts to use.

Important Note

If you are using this role from the ansible-galaxy website, make sure you use "jaytaylor.kafka" for the role name (rather than "ansible-kafka").

Role variables

Version notes

Version 2.0.0 does not support Ansible versions lower than 2.2.

Before version 2.0.0, server and producer Ansible variables were used to configure Kafka Server and Kafka Producer respecively, but 2.0.0 introduced better variable scoping and better variable overwritting:

Also:

License

BSD

Author

Jay Taylor

@jtaylor - jaytaylor.com - github