Home

Awesome

silpion.java

Install Oracle Java.

Synopsis

- name: Install Java 8u102 JDK to /opt/java
  hosts: all
  roles:
    - role: silpion.java
- name: Install Java server-jre to /usr/local/java
  hosts: all
  roles:
    - role: silpion.java
      java_oracle_distribution: srv
      java_install_dir: /usr/local/java
- name: Install Java JRE 8u60
  hosts: all
  roles:
    - role: silpion.java
      java_oracle_version: 8u60
      java_oracle_distribution: jre

Description

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).

Downloaded assets are verified based on SHA 256 checksums on the local workstation before getting copied to the managed node.

The local shasum binary is guessed automatically but may get configured via java_shasum_binary: /path/to/shasum/binary.

For detailed configuration options see Role Variables documentation below.

Dependencies

roles. This is configured for the ansible-galaxy install command in requirements.yml.

ansible-galaxy install --no-deps --role-file requirements.yml

<a name="role_variables"></a>Role Variables

Note: srv is an Ansible compatible shorthand for the Oracle server-jre.

Versioned variables

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:

Supported versions

Starting with

configuration of java_oracle_distribution: srv is available.

Role facts

This role sets persistent facts for other roles to use via

This variable contains the path to the default JVM configured with this role.

Checkmode

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.

Contributing

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.

License

Apache Version 2.0

Author

Contributors

<!-- vim: set ts=4 sw=4 et nofen: -->