From 6cbaef0857ac573a994cd54f33d8b3bc5712e52b Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 12 Feb 2020 16:00:42 +0100 Subject: [PATCH] tomcat javamelody: maven wants https now. --- library/roles/tomcat/defaults/main.yml | 2 ++ library/roles/tomcat/tasks/tomcat-pkgs.yml | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/library/roles/tomcat/defaults/main.yml b/library/roles/tomcat/defaults/main.yml index 22cc1f0..ef784eb 100644 --- a/library/roles/tomcat/defaults/main.yml +++ b/library/roles/tomcat/defaults/main.yml @@ -77,6 +77,8 @@ tomcat_jmx_localhost_only: False # Metrics monitoring via javamelody tomcat_javamelody: True +#tomcat_javamelody_version: latest +tomcat_javamelody_version: 1.79.0 # tomcat logging tomcat_logdir: '/var/log/tomcat{{ tomcat_version }}' diff --git a/library/roles/tomcat/tasks/tomcat-pkgs.yml b/library/roles/tomcat/tasks/tomcat-pkgs.yml index e5203d1..e7922db 100644 --- a/library/roles/tomcat/tasks/tomcat-pkgs.yml +++ b/library/roles/tomcat/tasks/tomcat-pkgs.yml @@ -43,13 +43,13 @@ - name: Configure tomcat defaults template: src=tomcat-default.j2 dest=/etc/default/tomcat{{ tomcat_version }} - when: tomcat_install_default_conf + when: tomcat_install_default_conf | bool notify: tomcat restart tags: [ 'tomcat', 'tomcat_default' ] - name: Configure tomcat server.xml template: src=tomcat-server.xml.j2 dest={{ tomcat_conf_dir }}/server.xml - when: tomcat_install_server_xml + when: tomcat_install_server_xml | bool notify: tomcat restart tags: [ 'tomcat', 'tomcat_serverxml' ] @@ -60,7 +60,7 @@ - name: Install a slightly modified catalina.properties copy: src=catalina.properties dest={{ tomcat_conf_dir }}/catalina.properties owner=root group={{ tomcat_user }} mode=0644 - when: tomcat_install_default_conf + when: tomcat_install_default_conf | bool notify: tomcat restart tags: [ 'tomcat', 'tomcat_catalinaprops' ] @@ -80,13 +80,13 @@ tags: [ 'tomcat', 'tomcat_javamelody' ] - name: Install the javamelody dependency jar into the Java shared libs directory - maven_artifact: artifact_id=jrobin version=latest group_id=org.jrobin extension=jar dest=/usr/share/java/jrobin.jar verify_checksum=always mode=0644 owner=root group=root - when: tomcat_javamelody + maven_artifact: artifact_id=jrobin version=latest group_id=org.jrobin extension=jar dest=/usr/share/java/jrobin.jar verify_checksum=always mode=0644 owner=root group=root repository_url=https://repo1.maven.org/maven2 + when: tomcat_javamelody | bool tags: [ 'tomcat', 'tomcat_javamelody' ] - name: Install the javamelody-core jar into the Java shared libs directory - maven_artifact: artifact_id=javamelody-core version={{ tomcat_javamelody_version }} group_id=net.bull.javamelody extension=jar dest=/usr/share/java/javamelody-core.jar verify_checksum=always mode=0644 owner=root group=root - when: tomcat_javamelody + maven_artifact: artifact_id=javamelody-core version={{ tomcat_javamelody_version }} group_id=net.bull.javamelody extension=jar dest=/usr/share/java/javamelody-core.jar verify_checksum=always mode=0644 owner=root group=root repository_url=https://repo1.maven.org/maven2 + when: tomcat_javamelody | bool tags: [ 'tomcat', 'tomcat_javamelody' ] - name: Create a link to the the javamelody jar and its dependencies if the javamelody support is enabled @@ -94,7 +94,7 @@ with_items: - javamelody-core.jar - jrobin.jar - when: tomcat_javamelody + when: tomcat_javamelody | bool tags: [ 'tomcat', 'tomcat_javamelody' ] - name: Remove the javamelody jar and its dependencies if the javamelody support is disabled @@ -102,5 +102,5 @@ with_items: - javamelody-core.jar - jrobin.jar - when: not tomcat_javamelody + when: not tomcat_javamelody | bool tags: [ 'tomcat', 'tomcat_javamelody' ]