From 02aa0ad579d0e704f38cf6096bd40975e4536c9b Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 29 Mar 2022 16:26:31 +0200 Subject: [PATCH] Do not install javamelody on Ubuntu Trusty. --- tasks/tomcat-javamelody.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tasks/tomcat-javamelody.yml b/tasks/tomcat-javamelody.yml index 1e51372..d0fb0ee 100644 --- a/tasks/tomcat-javamelody.yml +++ b/tasks/tomcat-javamelody.yml @@ -1,10 +1,6 @@ --- - name: Manage the javamelody installation block: - - set_fact: - ansible_python_interpreter: /usr/bin/python3.6 - when: ansible_distribution_release == "trusty" - - 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 repository_url=https://repo1.maven.org/maven2 @@ -17,11 +13,10 @@ - javamelody-core.jar - jrobin.jar - - set_fact: - ansible_python_interpreter: /usr/bin/python - when: ansible_distribution_release == "trusty" - - when: tomcat_javamelody + when: + - tomcat_javamelody + - ansible_distribution == "Ubuntu" + - ansible_distribution_version is version_compare('16.04', '>=') tags: [ 'tomcat', 'tomcat_javamelody', 'tomcat_conf' ] - name: Remove the javamelody jar and its dependencies if the javamelody support is disabled