ansiblebit.oracle-java

ansiblebit.oracle-java

License Build Status

Platform Platform Platform Platform

Project Stats

This is an Ansible role for installing the Oracle Java Development Kit (JDK).

Important: Using this role means you agree to the Oracle Binary Code License Agreement for Java SE.

Tests

Family Distribution Version Test Status
Debian Debian Jessie x86_64
Debian Debian Stretch x86_64
Debian Ubuntu Precise x86_64
... ... ... ...
RedHat Centos 7 x86_64

Requirements

  • Ansible version 2.x or higher

Facts

  • oracle_java_installed: Indicates if Java is installed.
  • oracle_java_version_installed: Shows the version of Java that is installed.

Role Variables

  • debug: Makes the output more detailed.
  • oracle_java_set_as_default: Set to yes to make Java the default version (default is yes).
  • oracle_java_use_defaults: Set to yes to use default values (default is yes). Setting to no will require you to provide all variables manually.

Debian

Note: To change any variable below, set oracle_java_use_defaults: no and provide values for all variables listed.

  • oracle_java_apt_repository: The PPA to install Java from.
  • oracle_java_deb_package: Name of the Debian package.
  • oracle_java_home: Location of the Java home directory.
  • oracle_java_state: The package state.

RedHat-specific

Note: Same as above; set oracle_java_use_defaults: no to provide your own values.

  • oracle_java_dir_source: Directory for storing RPM files.
  • oracle_java_home: Location of the Java home directory.
  • oracle_java_rpm_url: URL for accessing the RPM file.

Playbooks

# Generic playbook example
- hosts: servers
  roles:
    - role: ansiblebit.oracle-java

# Debian and Java 11 example
- hosts: servers
  roles:
    - role: ansiblebit.oracle-java
      oracle_java_deb_package: 'oracle-java11-installer'
      oracle_java_home: "/usr/lib/jvm/java-11-oracle"

Skip debugging information with --skip-tags=debug.

Testing

You can run tests using the following commands:

tox -e py27-ansible26 -- --box centos7-64.vagrant.dev
tox -e py27-ansible26 -- --box bionic64.vagrant.dev
Informazioni sul progetto

Role to install Oracle Java.

Installa
ansible-galaxy install ansiblebit.oracle-java
Licenza
bsd-3-clause
Download
2.9M
Proprietario