Skip to content

Commit

Permalink
update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
saiello committed Jul 10, 2022
1 parent 3d3adfe commit 71625b1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ If you want to increase partitions, replication factor, change your topic's para
* [kafka_info](library/kafka_info.py): Get infos on kafka resources
* [kafka_stat_lag](library/kafka_stat_lag.py): get lag info on topics / consumer groups
* [kafka_consumer_group](library/kafka_consumer_group.py): interact with kafka consumer groups
* [kafka_user](library/kafka_user.py): Manage kafka user
* [kafka_users](library/kafka_users.py): Manage more than one user in bulk mode
## Requirements
This library uses [kafka-python](https://github.com/dpkp/kafka-python), [kazoo](https://github.com/python-zk/kazoo) and [pure-sasl](https://github.com/thobbs/pure-sasl) libraries. Install them using pip:
```bash
Expand Down Expand Up @@ -209,6 +211,22 @@ Here some examples on how to use this library:
zookeeper: "{{ hostvars['zookeeper']['ansible_eth0']['ipv4']['address'] }}:2181"
bootstrap_servers: "{{ hostvars['kafka1']['ansible_eth0']['ipv4']['address'] }}:9092,{{ hostvars['kafka2']['ansible_eth0']['ipv4']['address'] }}:9092"

# create multiple users
- name: create users
kafka_users:
users:
- name: user1
password: changeit
state: present

# create a single user
- name: create user
kafka_user:
name: user1
password: changeit
state: present


# create ACLs for all topics
- name: create acls
kafka_acls:
Expand Down

0 comments on commit 71625b1

Please sign in to comment.