From f6feef6256527a0f887d3984ec2dda72809772cc Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 6 Dec 2018 17:06:18 +0100 Subject: [PATCH] Thredds: configure the correct log directory, remove all the old logs entries. See https://support.d4science.org/issues/12990 --- thredds/tasks/main.yml | 9 +- thredds/templates/log4j2.xml.j2 | 219 ++++++++++++++++++++++++++++++++ 2 files changed, 226 insertions(+), 2 deletions(-) create mode 100755 thredds/templates/log4j2.xml.j2 diff --git a/thredds/tasks/main.yml b/thredds/tasks/main.yml index a10a1a64..96cee4fc 100644 --- a/thredds/tasks/main.yml +++ b/thredds/tasks/main.yml @@ -22,7 +22,7 @@ register: thredds_skip_conf tags: [ 'thredds', 'tomcat', 'thredds_conf' ] - - name: Install the Thredds configuration files + - name: Install the Thredds data configuration files template: src={{ item[1] }}.j2 dest={{ thredds_data_content_dir }}/thredds/{{ item[1] }} owner={{ item.0.user }} group={{ item.0.user }} mode=644 with_nested: - '{{ tomcat_m_instances }}' @@ -66,12 +66,17 @@ with_items: '{{ tomcat_m_instances }}' notify: tomcat instances restart - - name: Install the Thredds configuration files + - name: Install the Thredds webapp configuration files template: src=web.xml.j2 dest={{ item.instance_path }}/webapps/{{ thredds_app_name | lower }}/WEB-INF/web.xml owner={{ item.user }} group={{ item.user }} mode=644 with_items: '{{ tomcat_m_instances }}' notify: tomcat instances restart tags: [ 'thredds', 'tomcat', 'thredds_conf', 'thredds_webxml' ] + - name: Install the Thredds log4j configuration file + template: src=log4j2.xml.j2 dest={{ item.instance_path }}/webapps/{{ thredds_app_name | lower }}/WEB-INF/classes/log4j2.xml owner=root group=root mode=0444 + with_items: '{{ tomcat_m_instances }}' + tags: [ 'thredds', 'tomcat', 'thredds_conf', 'thredds_log4j' ] + when: thredds_install tags: [ 'thredds', 'tomcat' ] diff --git a/thredds/templates/log4j2.xml.j2 b/thredds/templates/log4j2.xml.j2 new file mode 100755 index 00000000..aaddff18 --- /dev/null +++ b/thredds/templates/log4j2.xml.j2 @@ -0,0 +1,219 @@ + + + + ../content + {{ item.instance_path }}/logs/thredds + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +