KAMI911.java_oracle_jdk11
Ansible Role: Install Java 11 JDK or Server JRE
This role provides an easy way to install Java 11 Oracle JDK on Linux. It can download the package from the internet, use a local package, create a symlink to the latest version, and set up alternatives.
Travis status:
Code Climate status:
Test Coverage status:
Table of Contents
- Requirements
- Installation
- Role Variables
- Dependencies
- Example Playbook
- Licensing
- Author Information
- Support
- Contributing
- Donation
Requirements
No requirements.
Installation
To install, run this command:
ansible-galaxy install kami911.java-oracle-jdk11
Role Variables
Here are the available variables with their default values (found in defaults/main.yml
):
force_java_install
: False
If set to True, this will force Java installation even if it's already installed.java_installer_force_overwrite
: False
If True, this will overwrite the existing Java installer.java_installer_keep
: False
If True, the Java installer will not be deleted.java_installer_local
: False
If True, the role will use a local JDK/Server JRE instead of downloading it.java_type
: jdk
Specify the type of Java installer: JDK (jdk
) or Server JRE (serverjre
).java_version
: 11
The major version of Java.java_update
: 1
The minor version of Java.java_build
: "13"
The micro version of Java.java_platform
: linux-x64
The platform for Java installation.java_bins
: [ 'javah', 'javap', 'jmap', ... ]
This lists binaries for which to update alternatives.java_bins_priority
: 9
The priority for the alternatives for these binaries.java_usr_folder
: /usr/java
The directory where Java will be installed.java_latest_folder
: /usr/java/latest
The location to link the latest version.java_download_base_url
: http://download.oracle.com/otn-pub/java/jdk
The base URL for downloading Java installers.
Dependencies
No dependencies.
Example Playbook
- hosts: all
roles:
- java-oracle-jdk11
Licensing
This application and its documentation are licensed under the MIT/BSD terms. You can find the license in the LICENSE file included with the source.
Author Information
This role was created by Kálmán Szalai (KAMI) between 2016 and 2019.
Support
If you have questions, feel free to reach out. For bugs or feature requests, you can create an issue.
Using as a submodule in an AWX playbook
Add as a submodule
git submodule add --force [email protected]:KAMI911/ansible-role-java-oracle-jdk11.git roles/java-oracle-jdk11
Update the submodule
To update just this submodule:
git submodule update --remote roles/java-oracle-jdk11/
To update all submodules:
git submodule foreach git pull origin master
Contributing
You can contribute to ansible-role-java-oracle-jdk11 by sending patches, testing, reporting bugs, or helping with documentation. All contributions are welcome!
For more details, read the contributing chapter.
Fork me on GitHub
To fork the repository, use:
SSH:
[email protected]:KAMI911/ansible-role-java-oracle-jdk11.git
HTTPS:
https://github.com/KAMI911/ansible-role-java-oracle-jdk11
Add a new remote upstream
:
git remote add upstream https://github.com/KAMI911/ansible-role-java-oracle-jdk11.git
To pull updates from your upstream repository:
git fetch --all
git pull upstream HEAD
Donation
If you find this role helpful, please consider making a donation:
Ansible role for configuring Oracle Java 11 or Server JRE with local installation support
ansible-galaxy install KAMI911.java_oracle_jdk11