Skip to content

Commit

Permalink
Merge branch '7.5.x' into 7.6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mansisinha committed Jan 31, 2024
2 parents 5446b72 + 1b333ed commit 34ef1a5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
14 changes: 14 additions & 0 deletions roles/kafka_broker/tasks/rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@
}
) }}"

# store the original Controller properties when Controller and Broker colocated
- set_fact:
kafka_controller_initial_properties: "{{hostvars[inventory_hostname]['kafka_controller_final_properties']}}"
when:
- kraft_enabled|bool
- "inventory_hostname in groups.kafka_controller"

#this is required when we have mTLS enabled
- name: Add Broker's Principal to Controller's Super Users List
include_tasks: set_controller_principal.yml
Expand All @@ -66,6 +73,13 @@
when: kraft_enabled|bool and kafka_controller_ssl_mutual_auth_enabled|bool
run_once: true

# reset the Controller's properties to the original properties when Controller and Broker colocated
- set_fact:
kafka_controller_final_properties: "{{kafka_controller_initial_properties}}"
when:
- kraft_enabled|bool
- "inventory_hostname in groups.kafka_controller"

- name: Create SSL Certificate Directory
file:
path: /var/ssl/private
Expand Down
5 changes: 5 additions & 0 deletions roles/kafka_broker/tasks/set_controller_principal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@
include_role:
name: kafka_controller
tasks_from: create_config.yml

# reset the Controller's properties to the original properties when Controller and Broker colocated
- set_fact:
kafka_controller_final_properties: "{{kafka_controller_initial_properties}}"
when: "inventory_hostname in groups.kafka_controller"

0 comments on commit 34ef1a5

Please sign in to comment.