ansible-role-tomcat/tasks/tomcat-logger-logging.yml

27 lines
875 B
YAML

---
- name: Remove the system log4j library from the tomcat libdir
file: dest={{ tomcat_catalina_home_dir }}/lib/{{ item }} state=absent
with_items:
- log4j-1.2.jar
- tomcat-juli-adapters.jar
notify: tomcat restart
tags: tomcat
- name: Configure tomcat to use the standard version of the juli library
file: src=/usr/share/java/{{ item }} dest={{ tomcat_catalina_home_dir }}/bin/{{ item }} state=link
with_items:
- 'tomcat{{ tomcat_version }}-juli.jar'
notify: tomcat restart
tags: tomcat
- name: Remove the system log4j.properties
file: dest={{ tomcat_catalina_home_dir }}/lib/log4j.properties state=absent
notify: tomcat restart
tags: tomcat
- name: Install logging.properties
copy: src=logging.properties dest=/etc/tomcat{{ tomcat_version }}/logging.properties owner=root group=root mode=0644
notify: tomcat restart
tags: tomcat