Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions roles/kafka_controller/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,33 @@
tags:
- filesystem

- name: Create log4j Directory
file:
path: "{{kafka_controller.log4j_file | dirname}}"
owner: "{{kafka_controller_user}}"
group: "{{kafka_controller_group}}"
state: directory
mode: '750'
tags:
- filesystem
- log
when: kafka_controller.log4j_file != kafka_broker.log4j_file
Copy link
Contributor Author

@piif piif Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be we should compare to kafka package default path, thus
"{{ (base_path, 'etc/kafka/log4j.properties') | path_join }}" ?


- name: Create kafka_controller log4j config
copy:
src: "{{kafka_broker.log4j_file}}"
dest: "{{kafka_controller.log4j_file}}"
remote_src: True
force: False # create only if it does not exists
mode: '640'
owner: "{{kafka_controller_user}}"
group: "{{kafka_controller_group}}"
when: kafka_controller.log4j_file != kafka_broker.log4j_file
notify: "restart Kafka Controller"
tags:
- configuration
- log

- name: Update Kafka log4j Config for Log Cleanup
include_role:
name: common
Expand Down