Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit 1a50bfa

Browse files
committed
Java 11 installation - Cover more OS versions
- Debian based: Java 11 for all versions starting with Debian 10 - RedHat based: Java 11 for all versions starting with RHEL 7
1 parent 5fcca57 commit 1a50bfa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

vars/Debian.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
java_version: "{% if ansible_os_family == 'Debian' and ansible_distribution_major_version == '10' %}11{% else %}8{% endif %}"
3-
java: "{% if es_java is defined %}{{es_java}}{% else %}openjdk-{{ java_version }}-jre-headless{% endif %}"
2+
java_version: "{{ (ansible_distribution_major_version | int >= 10) | ternary('11', '8') }}"
3+
java: "{% if es_java is defined %}{{ es_java }}{% else %}openjdk-{{ java_version }}-jre-headless{% endif %}"
44
default_file: "/etc/default/elasticsearch"
55
es_home: "/usr/share/elasticsearch"
66
es_apt_key_id: "46095ACC8548582C1A2699A9D27D666CD88E42B4"

vars/RedHat.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2-
java: "{{ es_java | default('java-1.8.0-openjdk.x86_64') }}"
2+
java_version: "{{ (ansible_distribution_major_version | int >= 7) | ternary('11', '1.8.0') }}"
3+
java: "{% if es_java is defined %}{{ es_java }}{% else %}java-{{ java_version }}-openjdk.x86_64{% endif %}"
34
default_file: "/etc/sysconfig/elasticsearch"
45
es_home: "/usr/share/elasticsearch"

0 commit comments

Comments
 (0)