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

Commit

Permalink
Java 11 installation - Cover more OS versions
Browse files Browse the repository at this point in the history
- Debian based: Java 11 for all versions starting with Debian 10
- RedHat based: Java 11 for all versions starting with RHEL 7
  • Loading branch information
darxriggs committed Oct 2, 2021
1 parent 5fcca57 commit 1a50bfa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions vars/Debian.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
java_version: "{% if ansible_os_family == 'Debian' and ansible_distribution_major_version == '10' %}11{% else %}8{% endif %}"
java: "{% if es_java is defined %}{{es_java}}{% else %}openjdk-{{ java_version }}-jre-headless{% endif %}"
java_version: "{{ (ansible_distribution_major_version | int >= 10) | ternary('11', '8') }}"
java: "{% if es_java is defined %}{{ es_java }}{% else %}openjdk-{{ java_version }}-jre-headless{% endif %}"
default_file: "/etc/default/elasticsearch"
es_home: "/usr/share/elasticsearch"
es_apt_key_id: "46095ACC8548582C1A2699A9D27D666CD88E42B4"
3 changes: 2 additions & 1 deletion vars/RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
java: "{{ es_java | default('java-1.8.0-openjdk.x86_64') }}"
java_version: "{{ (ansible_distribution_major_version | int >= 7) | ternary('11', '1.8.0') }}"
java: "{% if es_java is defined %}{{ es_java }}{% else %}java-{{ java_version }}-openjdk.x86_64{% endif %}"
default_file: "/etc/sysconfig/elasticsearch"
es_home: "/usr/share/elasticsearch"

0 comments on commit 1a50bfa

Please sign in to comment.