Create, delete and modify kafka-topics with the module kafka_topic.
Copy the file library/kafka_topic.py in your Ansible-Module-Library. This file also contains a detailed documentation of the module.
The file alot_of_options.yml is an example-playbook using the module. If you got a local Kafka-Cluster, maybe modify the bootstrap-server-param a little and get started with:
ansible-playbook alot_of_options.yml -vvv
- Working Ansible and Python-environment with pip.
- Install Python-module: confluent-kafka.
pip install confluent-kafka