forked from ISTI-ansible-roles/ansible-roles
Merge branch 'master' of andrea.dellamico/ansible-playbooks into master
This commit is contained in:
commit
f5f2ee34ce
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
- import_tasks: set_jdk_home.yml
|
||||
- import_tasks: smartgears-app.yml
|
||||
- import_tasks: data-transfer-service.yml
|
||||
when: data_transfer_service_install
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
---
|
||||
- block:
|
||||
- name: Are we using the distribution OpenJDK?
|
||||
stat:
|
||||
path: /usr/lib/jvm/java-{{ openjdk_default }}-openjdk-amd64
|
||||
register: jdk_java_home_path
|
||||
when: openjdk_default is defined
|
||||
|
||||
- debug:
|
||||
msg: 'The jdk java home is {{ jdk_java_home_path.stat.path }}'
|
||||
when: jdk_java_home_path.stat.path is defined
|
||||
|
||||
- name: Set the Java home when we are using the distribution OpenJDK
|
||||
set_fact:
|
||||
jdk_java_home: '{{ jdk_java_home_path.stat.path }}'
|
||||
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' ]
|
||||
|
||||
- block:
|
||||
- name: Are we using the Zulu OpenJDK?
|
||||
stat:
|
||||
path: /usr/lib/jvm/zulu-{{ openjdk_default }}-amd64
|
||||
register: jdk_java_home_path
|
||||
when: openjdk_default is defined
|
||||
|
||||
- debug:
|
||||
msg: 'The jdk java home is {{ jdk_java_home_path.stat.path }}'
|
||||
when: jdk_java_home_path.stat.path is defined
|
||||
|
||||
- name: Set the Java home when we are using the distribution OpenJDK
|
||||
set_fact:
|
||||
jdk_java_home: '{{ jdk_java_home_path.stat.path }}'
|
||||
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' ]
|
||||
|
||||
- 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 }}'
|
||||
when: jdk_java_home_path.stat.path is defined
|
||||
|
||||
- name: Set the Java home when we are using the Oracle JDK
|
||||
set_fact:
|
||||
jdk_java_home: '{{ jdk_java_home_path.stat.path }}'
|
||||
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' ]
|
||||
|
||||
- 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' ]
|
Loading…
Reference in New Issue