diff --git a/tomcat/tasks/main.yml b/tomcat/tasks/main.yml index 11ba07e5..2edc764e 100644 --- a/tomcat/tasks/main.yml +++ b/tomcat/tasks/main.yml @@ -6,8 +6,10 @@ when: - tomcat_jmx_enabled - tomcat_jmx_auth_enabled + tags: [ 'tomcat', 'jmx' ] - include: tomcat-log4j-logging.yml when: tomcat_use_log4j + tags: [ 'tomcat', 'tomcat_log4j' ] - include: tomcat-logger-logging.yml when: not tomcat_use_log4j - include: access_log.yml diff --git a/tomcat/tasks/tomcat-jmx.yml b/tomcat/tasks/tomcat-jmx.yml index 4f0fbff6..5d9d20e7 100644 --- a/tomcat/tasks/tomcat-jmx.yml +++ b/tomcat/tasks/tomcat-jmx.yml @@ -4,19 +4,13 @@ when: - tomcat_jmx_enabled - tomcat_jmx_auth_enabled - notify: - - tomcat restart - tags: - - tomcat - - jmx + notify: tomcat restart + tags: [ 'tomcat', 'jmx' ] - name: Distribute the jmx role file copy: src=jmxremote.access dest={{ tomcat_jmx_auth_dir }}/jmxremote.access owner=root mode=0644 when: - tomcat_jmx_enabled - tomcat_jmx_auth_enabled - notify: - - tomcat restart - tags: - - tomcat - - jmx + notify: tomcat restart + tags: [ 'tomcat', 'jmx' ] diff --git a/tomcat/tasks/tomcat-log4j-logging.yml b/tomcat/tasks/tomcat-log4j-logging.yml index 403161d9..cc11deb9 100644 --- a/tomcat/tasks/tomcat-log4j-logging.yml +++ b/tomcat/tasks/tomcat-log4j-logging.yml @@ -2,52 +2,40 @@ # Manage tomcat internal logs with log4j - name: Install log4j apt: pkg=liblog4j1.2-java state={{ tomcat_pkg_state }} - notify: - tomcat restart - tags: - - tomcat + notify: tomcat restart + tags: [ 'tomcat', 'tomcat_log4j' ] - name: Install tomcat-juli-adapters copy: src=tomcat{{ tomcat_version }}-juli-adapters.jar dest=/usr/share/java/tomcat-juli-adapters.jar - tags: - - tomcat + tags: [ 'tomcat', 'tomcat_log4j' ] - name: Install tomcat-juli copy: src=tomcat{{ tomcat_version }}-juli-log4j.jar dest=/usr/share/java/tomcat-juli-log4j.jar - tags: - - tomcat + tags: [ 'tomcat', 'tomcat_log4j' ] - name: Configure tomcat to use the log4j system library file: src=/usr/share/java/{{ item }} dest={{ tomcat_catalina_home_dir }}/lib/{{ item }} state=link with_items: - log4j-1.2.jar - tomcat-juli-adapters.jar - notify: - tomcat restart - tags: - - tomcat + notify: tomcat restart + tags: [ 'tomcat', 'tomcat_log4j' ] - name: Configure tomcat to use the log4j version of the juli library file: src=/usr/share/java/{{ item }} dest={{ tomcat_catalina_home_dir }}/bin/tomcat-juli.jar state=link with_items: - tomcat-juli-log4j.jar - notify: - tomcat restart - tags: - - tomcat + notify: tomcat restart + tags: [ 'tomcat', 'tomcat_log4j' ] - name: Install log4j.properties template: src=log4j.properties.j2 dest={{ tomcat_catalina_home_dir }}/lib/log4j.properties mode=0644 owner=root group=root when: tomcat_install_the_log4j_properties - notify: - tomcat restart - tags: - - tomcat + notify: tomcat restart + tags: [ 'tomcat', 'tomcat_log4j' ] - name: Remove logging.properties file: dest=/etc/tomcat{{ tomcat_version }}/logging.properties state=absent - notify: - tomcat restart - tags: - - tomcat + notify: tomcat restart + tags: [ 'tomcat', 'tomcat_log4j' ]