Add support for log4j.properties

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Change-Id: I9dc68f892852aef42d45c783abd9fb908565a85e
This commit is contained in:
Paul Belanger 2021-06-21 15:22:50 -04:00
parent e26511faaf
commit 16e05cc668
3 changed files with 29 additions and 0 deletions

View File

@ -26,6 +26,12 @@ zookeeper_user_home: /var/lib/zookeeper
zookeeper_user_home_mode: 0750 zookeeper_user_home_mode: 0750
# zookeeper_user_shell: # zookeeper_user_shell:
zookeeper_file_log4j_properties_dest: /etc/zookeeper/conf/log4j.properties
zookeeper_file_log4j_properties_group: zookeeper
zookeeper_file_log4j_properties_mode: 0644
zookeeper_file_log4j_properties_owner: zookeeper
zookeeper_file_log4j_properties_src: etc/zookeeper/conf/log4j.properties
zookeeper_file_myid_group: zookeeper zookeeper_file_myid_group: zookeeper
zookeeper_file_myid_mode: 0644 zookeeper_file_myid_mode: 0644
zookeeper_file_myid_owner: zookeeper zookeeper_file_myid_owner: zookeeper

View File

@ -44,6 +44,16 @@
- /etc/zookeeper/conf - /etc/zookeeper/conf
- /var/log/zookeeper - /var/log/zookeeper
- name: Install zookeeper log4j.properties
become: yes
template:
dest: "{{ zookeeper_file_log4j_properties_dest }}"
group: "{{ zookeeper_file_log4j_properties_group }}"
mode: "{{ zookeeper_file_log4j_properties_mode }}"
owner: "{{ zookeeper_file_log4j_properties_owner }}"
src: "{{ zookeeper_file_log4j_properties_src }}"
register: zookeeper_file_log4j_properties
- name: Install zookeeper myid - name: Install zookeeper myid
become: yes become: yes
template: template:

View File

@ -0,0 +1,13 @@
# This file is generated by Ansible
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#
log4j.rootLogger=${zookeeper.root.logger}
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=INFO
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n
log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender
log4j.appender.ROLLINGFILE.Threshold=DEBUG
log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/zookeeper.log