Skip to content

Instantly share code, notes, and snippets.

Created September 8, 2017 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/604874cd700401822d4d81d348900855 to your computer and use it in GitHub Desktop.
Save anonymous/604874cd700401822d4d81d348900855 to your computer and use it in GitHub Desktop.
# Set up alternatives to properly use openjdk
{% set openjdk_executable = "/usr/lib/jvm/jre-1." + environment.version + ".0-openjdk/bin/java" %}
java_executable_exists:
file.exists:
- name: {{ openjdk_executable}}
java_alternatives_installed:
alternatives.install:
- name: java
- link: /usr/bin/java
- path: {{ openjdk_executable}}
- priority: 9000
- require:
- file: java_executable_exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment