This Ansible Role aims to install and configure Apache Kafka and Apache Zookeeper using the Confluent package.
All configurations can be passed through vars, you can see the list of necessary vars at defaults and customize them as you wish.
Ansible 2.10+, Python and Pip.
pip install ansible>=2.10.0
After installing Ansible, you MUST install a Java role, JDK is a must-have in your playbook. Kafka needs a JVM to run.
You can see the recommended version here) as well as the supported Java versions and JDK implementations.
Pick your favorite from the list, set a role to install and configure it.
The test suite is currently executing against Ansible 2.12 (as you can see here), inside Docker containers running Ansible on Python 3, using Open JDK for the sake of testing.
If you are curious about the status, there is a scheduled job that runs every day, take a look at the GitHub Actions build history ;)
For further information on the Docker images being used to run containers on the CI, take a look at docker-ansible
---
- hosts: kafka,zookeeper
vars:
local_path: "/tmp"
confluent_version: "5.4.0"
confluent_distribution: "confluent-community"
log_basepath: "/var/log"
data_basepath: "/var/data"
initscripts_path: "/usr/sbin"
conf_dest: "/etc/config"
roles:
- macunha1.confluent_kafka
---
- hosts: kafka,zookeeper
roles:
- macunha1.confluent_kafka
[kafka]
192.168.50.3
[zookeeper]
192.168.50.3
Feel free to fill an issue containing feature request(s), or (even better) to send me a Pull request, I would be happy to collaborate with you.
If this role didn't work for you, or if you found some bug during the execution, let me know.