macunha1.confluent_kafka
# Confluent Kafka Ansible Role









This Ansible Role helps you install and set up Apache Kafka and Apache Zookeeper using the [Confluent package](https://www.confluent.io).
You can customize settings through variables. Find the list of required variables in [defaults](defaults/main.yaml) and modify them as needed.
## Getting Started
### Prerequisites
You need Ansible version 2.10 or higher, as well as Python and Pip.
```shell
pip install ansible>=2.10.0
After installing Ansible, you need a Java role since JDK is essential for your playbook. Kafka requires a JVM to run.
You can check the recommended Java version here along with supported Java versions and JDK implementations.
Choose your preferred version from the list and set a role to install and configure it.
Tests
The test suite runs with Ansible 2.12 (check here) in Docker containers using Ansible on Python 3 and Open JDK for testing.
A scheduled job runs every day, so you can check the GitHub Actions build history for updates ;)
For more information on the Docker images used for testing, see docker-ansible.
Quickstart
Example playbook
---
- 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
Minimal playbook
---
- hosts: kafka,zookeeper
roles:
- macunha1.confluent_kafka
Example inventory
[kafka]
192.168.50.3
[zookeeper]
192.168.50.3
Contribute
Feel free to create an issue for feature requests or, even better, submit a pull request. I'm happy to collaborate with you!
If this role doesn't work for you or you find a bug, please let me know. ```
Ansible Role to install Apache Kafka and Apache Zookeeper using the Confluent package.
ansible-galaxy install macunha1.confluent_kafka