Install Oracle Java.
The role downloads redistributable packages from the internet to the hosts local filesystem before it may install those on any number of managed nodes in the local network.
Downloads are performed with the command module using curl. It is required to have curl installed on the local host you are running ansible-playbook on to manage nodes (your workstation).
java_oracle_distribution
: Configure the Java distribution to be installed (default:jdk
, values: [jdk
,jre
,srv
])java_oracle_version
: Configure Java version to be installed (string, default:8u66
)java_install_dir
: Base installation directory for any Java implementation/distribution (string, default:/opt/java
)java_shasum_binary
: Allows to configure shasum binary for local_action: command (string, default:with_first_found: java_shasum_binaries
(seevars/main.yml
))
Note: srv
is an Ansible compatible shorthand for the Oracle server-jre
.
Predefined SHA sums and further version specific configuration may get found in
the vars/versions
directory. When configuring a version, that is not predefined
(so far), the following variables must also be defined in the playbook:
java_oracle_version_major
: Oracle major versionjava_oracle_version_minor
: Oracle minor versionjava_oracle_version_patch
: Oracle patch versionjava_oracle_version_update
: Oracle major versionjava_oracle_version_build
: Oracle build versionjava_oracle_redis_jdk_sha256sum
: SHA256 sum for the downloaded Oracle Java JDK redistributable package - mandatory whenjava_oracle_distribution
isjdk
java_oracle_redis_jre_sha256sum
: SHA256 sum for the downloaded Oracle Java JRE redistributable package - mandatory whenjava_oracle_distribution
isjre
java_oracle_redis_srv_sha256sum
: SHA256 sum for the downloaded Oracle Java Server-JRE redistributable package - mandatory whenjava_oracle_distribution
issrv
java_oracle_redis_jce_sha256sum
: SHA256 sum for the downloaded Oracle Java JCE policies packagejava_oracle_mirror_jce
: Mirror URL for the download of the Oracle Java JCE policies packagejava_oracle_redis_jce_filename
: File name of the Oracle Java JCE policies packagejava_oracle_redis_jce_archive_dirname
: Name of the base directory in the Oracle Java JCE policies package
- 7u21
- 7u51
- 7u71
- 7u80
- 8u20
- 8u25
- 8u31
- 8u45
- 8u51
- 8u60
- 8u65
- 8u66
Starting with 8u66
configuration of java_oracle_distribution
: srv
is
available.
This role sets persistent facts for other roles to use via
- facts.d
ansible_local.java.general.java_home
This variable contains the path to the default JVM configured with this role.
This role depends on groover.util
role. This is configured
for ansible-galaxy install
in requirements.yml.
NOTE: Requirements are installed as virtual user silpion
(silpion.util
)
Be sure to install required roles with
ansible-galaxy install --role-file requirements.yml
Checkmode is supported provided that all assets have been downloaded. Otherwise, the copy tasks will fail.
You can download the assets without making any changes on the remote nodes by executing this role with the java_download
tag.
- hosts: all
roles:
- { role: ansible-java }
If you want to contribute to this repository please be aware that this
project uses a gitflow
workflow with the next release branch called next
.
Please fork this repository and create a local branch split off of the next
branch and create pull requests back to the origin next
branch.
Apache Version 2.0
- Mark Kusch @mark.kusch silpion.de
- Marc Rohlfs @marc.rohlfs silpion.de
- Alvaro Aleman @alvaro.aleman silpion.de