jpnewman.java

jpnewman.java

Ansible Role Build Status

This is an Ansible role that helps you install Oracle Java 8 or OpenJDK.

You can install Oracle Java 8 using apt-get, direct download, or from local files.

Requirements

You need Ansible 2.x.

Role Variables

Variable Description Default
apt_cache_valid_time Time the apt cache is considered valid 600 seconds
java_installer_type Choose one of the following types:
- oracle_ppa
- oracle_url
- oracle_file
- openjdk
oracle_ppa
install_java If set to false, Java is configured but not installed true
apt_java_state State of the Ansible apt module present
codename_apt_codename_map Maps the actual codename to the apt codename for use with the oracle_ppa mode codename_apt_codename_map_object

codename_apt_codename_map_object

Variable Description Default
release_codename The actual codename e.g. jessie
use_apt_codename Codename to use e.g. xenial

Oracle Java PPA oracle_ppa

This section describes how to install Oracle Java JCE from the Apt PPA.

Variable Description Default
apt_java_repo Apt Repository ppa:webupd8team/java
apt_java_package oracle-java8-installer

Oracle Java URL oracle_url

This section explains how to install Oracle Java from a URL.

Variable Description Default
oracle_java_url_file jdk-8u161-linux-x64.tar.gz
oracle_java_url_path http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/
oracle_java_url_header "Cookie: oraclelicense=a"
oracle_java_extract_folder jdk1.8.0_161
oracle_java_jvm_dir /usr/lib/jvm
oracle_java_jvm_folder java-8-oracle
oracle_java_install_dir "{{ oracle_java_jvm_dir }}/{{ oracle_java_jvm_folder }}"
oracle_java_download_folder /tmp
oracle_java_usr_bin_dir /usr/bin
oracle_java_link_exe - java
- javac
- jar
- jrunscript

Oracle Java URL, JCE

This section explains how to install Oracle Java JCE from a URL.

Variable Description Default
oracle_java_jce_install true
oracle_java_jce_url_file jce_policy-8.zip
oracle_java_jce_url_path http://download.oracle.com/otn-pub/java/jce/8/
oracle_java_jce_extract_folder UnlimitedJCEPolicyJDK8

Oracle Java File

This section explains how to install Oracle Java using local files.

Download the installers from http://www.oracle.com/technetwork/java/javase/downloads/index.html and place them in the files folder.

Variable Description Default
oracle_java_file jdk-8u161-linux-x64.tar.gz
oracle_java_jce_file jce_policy-8.zip

OpenJDK openjdk

This section describes how to install OpenJDK.

Variable Description Default
apt_openjdk_packages codename_ppa_map_object

codename_ppa_map_object

Variable Description Default
use_apt_codenames List of codenames
apt_repos Apt Repository
use_apt_packages Packages to install
default_release Default Apt Releases

Dependencies

  • None

Example Playbook

- hosts: servers
  roles:
     - { role: jpnewman.java, tags: ["init"] }

License

MIT / BSD

Author Information

John Paul Newman

Informazioni sul progetto

Java 8

Installa
ansible-galaxy install jpnewman.java
Licenza
mit
Download
161.2k
Proprietario
Software Engineer with DevOps working on both Windows and *nix.