Skip to content

Commit

Permalink
Add custom zookeeper id for each host based in inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
Guilherme Baufaker Rêgo authored and rpelisse committed Oct 12, 2023
1 parent 77c4577 commit 6a807c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions roles/amq_streams_zookeeper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ zknode3
|`amq_streams_zookeeper_admin_enable_server` | Enable zookeeper administration server | `false` |
|`amq_streams_zookeeper_instance_count_enabled` | Count zookeeper instances | `true` |
|`amq_streams_zookeeper_instance_count` | | `0` |
|`amq_streams_zookeeper_zookeeper_id` | Zookeeper variable to identify the zookeeper in a cluster | |
|`amq_streams_zookeeper_java_opts` | Default values to apply to `KAFKA_OPTS` env variable | |
|`amq_streams_zookeeper_java_heap_opts` | Default values to apply to `KAFKA_HEAP_OPTS` env variable | `-Xmx512M -Xms512M` |
|`amq_streams_zookeeper_java_performance_opts` | Default values to apply to `KAFKA_JVM_PERFORMANCE_OPTS` env variable | |
Expand Down
2 changes: 1 addition & 1 deletion roles/amq_streams_zookeeper/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

- name: "Configure 'myid' file based on the position in the zookeepers group"
copy:
content: "{{ amq_streams_zookeeper_inventory_group.index(inventory_hostname) + 1 }}"
content: "{{ amq_streams_zookeeper_zookeeper_id | default(amq_streams_zookeeper_inventory_group.index(inventory_hostname) + 1) }}"
dest: "{{ amq_streams_zookeeper_data_dir }}/myid"
owner: "{{ amq_streams_zookeeper_user | default(omit) }}"
group: "{{ amq_streams_zookeeper_group | default(omit) }}"
Expand Down

0 comments on commit 6a807c5

Please sign in to comment.