Skip to content

Instantly share code, notes, and snippets.

@ownport
Created July 3, 2015 05:22
Show Gist options
  • Save ownport/b341affbb810ef9c670c to your computer and use it in GitHub Desktop.
Save ownport/b341affbb810ef9c670c to your computer and use it in GitHub Desktop.
ansible: set linkk to java
To be able to make the java and jar executables accessible to anybody from anywhere, we need to set symbolic links (actually we just install an alternative).
- name: Set java link
action: command update-alternatives --install /usr/bin/java java ${jvm_folder}/jdk1.7.0/bin/java 1
only_if: '${jdk_installed.changed}'
- name: Set jar link
action: command update-alternatives --install /usr/bin/jar jar ${jvm_folder}/jdk1.7.0/bin/jar 1
only_if: '${jdk_installed.changed}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment