Fix the installation of javamelody on Ubuntu Trusty
This commit is contained in:
parent
a031904751
commit
8b870bfb9e
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
- import_tasks: tomcat-pkgs.yml
|
- import_tasks: tomcat-pkgs.yml
|
||||||
|
- import_tasks: tomcat-javamelody.yml
|
||||||
- import_tasks: tomcat-admin.yml
|
- import_tasks: tomcat-admin.yml
|
||||||
when: tomcat_install_admin
|
when: tomcat_install_admin
|
||||||
- import_tasks: tomcat-jmx.yml
|
- import_tasks: tomcat-jmx.yml
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
---
|
||||||
|
- 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
|
||||||
|
|
||||||
|
- 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 repository_url=https://repo1.maven.org/maven2
|
||||||
|
|
||||||
|
- name: Create a link to the the javamelody jar and its dependencies if the javamelody support is enabled
|
||||||
|
file: src=../../java/{{ item }} dest={{ tomcat_catalina_home_dir }}/lib/{{ item }} state=link owner=root group=root mode=0644
|
||||||
|
with_items:
|
||||||
|
- javamelody-core.jar
|
||||||
|
- jrobin.jar
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
ansible_python_interpreter: /usr/bin/python
|
||||||
|
when: ansible_distribution_release == "trusty"
|
||||||
|
|
||||||
|
when: tomcat_javamelody
|
||||||
|
tags: [ 'tomcat', 'tomcat_javamelody', 'tomcat_conf' ]
|
||||||
|
|
||||||
|
- name: Remove the javamelody jar and its dependencies if the javamelody support is disabled
|
||||||
|
file: dest={{ tomcat_catalina_home_dir }}/lib/{{ item }} state=absent
|
||||||
|
with_items:
|
||||||
|
- javamelody-core.jar
|
||||||
|
- jrobin.jar
|
||||||
|
when: not tomcat_javamelody
|
||||||
|
tags: [ 'tomcat', 'tomcat_javamelody', 'tomcat_conf' ]
|
|
@ -84,28 +84,3 @@
|
||||||
when: tomcat_version >= 8
|
when: tomcat_version >= 8
|
||||||
tags: [ 'tomcat', 'tomcat_conf' ]
|
tags: [ 'tomcat', 'tomcat_conf' ]
|
||||||
|
|
||||||
- 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
|
|
||||||
when: tomcat_javamelody | bool
|
|
||||||
tags: [ 'tomcat', 'tomcat_javamelody', 'tomcat_conf' ]
|
|
||||||
|
|
||||||
- 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 repository_url=https://repo1.maven.org/maven2
|
|
||||||
when: tomcat_javamelody | bool
|
|
||||||
tags: [ 'tomcat', 'tomcat_javamelody', 'tomcat_conf' ]
|
|
||||||
|
|
||||||
- name: Create a link to the the javamelody jar and its dependencies if the javamelody support is enabled
|
|
||||||
file: src=../../java/{{ item }} dest={{ tomcat_catalina_home_dir }}/lib/{{ item }} state=link owner=root group=root mode=0644
|
|
||||||
with_items:
|
|
||||||
- javamelody-core.jar
|
|
||||||
- jrobin.jar
|
|
||||||
when: tomcat_javamelody | bool
|
|
||||||
tags: [ 'tomcat', 'tomcat_javamelody', 'tomcat_conf' ]
|
|
||||||
|
|
||||||
- name: Remove the javamelody jar and its dependencies if the javamelody support is disabled
|
|
||||||
file: dest={{ tomcat_catalina_home_dir }}/lib/{{ item }} state=absent
|
|
||||||
with_items:
|
|
||||||
- javamelody-core.jar
|
|
||||||
- jrobin.jar
|
|
||||||
when: not tomcat_javamelody | bool
|
|
||||||
tags: [ 'tomcat', 'tomcat_javamelody', 'tomcat_conf' ]
|
|
||||||
|
|
Loading…
Reference in New Issue