Skip to content

Latest commit

 

History

History

examples

Library usage examples

Common

For each example, you will find:

  • a docker-compose.yml file to bring up the minimum services required to use the example
  • a playbook.yml that performs some actions using the library

Usage

Make sure to cd in the folder examples.

  1. Create a virtualenv and source it
python3 -m venv venv && source venv/bin/activate
  1. Install requirements
pip install -r ../requirements.txt
  1. Install Ansible
pip install ansible
  1. Install roles
ansible-galaxy install --force -r requirements.yml
  1. Bring up the needed stack
docker-compose -f ${folder}/docker-compose.yml up -d
  1. Trigger the playbook
ansible-playbook ${folder}/playbook.yml -v

Examples

acl-creation

Create 2 different ACLs.

acl-creation-multiops

Create and delete multiple different ACLs.

scram-user-configuration

Create and delete multiple Kafka users.

topic-creation

Create a topic.

topic-partition-update

Create a topic and update its number of partitions.

topic-replica-update

Create a topic and update its number of replica.

topic-options-update

Create a topic and update the retention.ms configuration.