set_jdk_home: add the 'smartgears_conf' task, fix the block that checks for Oracle JDK. See https://support.d4science.org/issues/16607

This commit is contained in:
Andrea Dell'Amico 2019-05-02 11:23:37 +02:00
parent d56e7be10c
commit 65dbfd8bee
1 changed files with 4 additions and 5 deletions

View File

@ -16,7 +16,7 @@
when: jdk_java_home_path.stat.isdir is defined and jdk_java_home_path.stat.isdir
when: jdk_java_home is not defined
tags: [ 'smartgears', 'smartgears_distribution', 'tomcat' ]
tags: [ 'smartgears', 'smartgears_distribution', 'smartgears_conf', 'tomcat' ]
- block:
- name: Are we using the Zulu OpenJDK?
@ -35,14 +35,13 @@
when: jdk_java_home_path.stat.isdir is defined and jdk_java_home_path.stat.isdir
when: jdk_java_home is not defined
tags: [ 'smartgears', 'smartgears_distribution', 'tomcat' ]
tags: [ 'smartgears', 'smartgears_distribution', 'smartgears_conf', 'tomcat' ]
- block:
- name: Are we using the Oracle JDK?
stat:
path: /usr/lib/jvm/java-{{ jdk_default }}-oracle
register: jdk_java_home_path
when: openjdk_default is not defined
- debug:
msg: 'The jdk java home is {{ jdk_java_home_path.stat.path }}'
@ -54,10 +53,10 @@
when: jdk_java_home_path.stat.isdir is defined and jdk_java_home_path.stat.isdir
when: jdk_java_home is not defined
tags: [ 'smartgears', 'smartgears_distribution', 'tomcat' ]
tags: [ 'smartgears', 'smartgears_distribution', 'smartgears_conf', 'tomcat' ]
- name: Fail if we are not able to set the jdk_java_home variable
fail:
msg: 'No valid JDK installation found, failing!'
when: jdk_java_home is not defined
tags: [ 'smartgears', 'smartgears_distribution', 'tomcat' ]
tags: [ 'smartgears', 'smartgears_distribution', 'smartgears_conf', 'tomcat' ]