jetune.java

Ansible Role for Java on Linux

Python Version License Build Status Galaxy Role Downloads

This Ansible role is designed to install Java (OpenJDK) on Linux operating systems.

Supported Java Versions

  • OpenJDK versions: 7, 8, 9, 10, 11, 12

Supported Operating Systems

  • CentOS 6/7
  • RedHat 6/7
  • Ubuntu (Trusty, Xenial, Bionic)
  • Debian (Jessie, Stretch)

How to Use

  1. Install the Role:

    ansible-galaxy install jetune.java
    
  2. Add it to your playbook:

    - hosts: all
    
      roles:
        - jetune.java
    
      vars:
        # Specify a repository for installation (e.g. for Ubuntu)
        __repositories:
          - repo: ppa:openjdk-r/ppa
            os: Ubuntu
            v_major: 18
        
        # JDK options to install from the repository (OpenJDK version 8 with priority 100)
        from_repo: true
        v_major: 8
        alternative_priority: 100
        implementation: OPENJDK
    

Example Variables

Here are some sample configuration variables:

# Repository for apt install
__repositories:
 - repo: ppa:openjdk-r/ppa
   os: Debian
   v_major: 18

# JDK to install from the repository, version 8
from_repo: true
v_major: 8
alternative_priority: 100
implementation: OPENJDK
is_default: true

# JDK packages for version 7 - update 75 - build 13
from_repo: false
implementation: OPENJDK
v_major: 7
v_minor: 75
build: 13
os: linux
arch: x64
date: 18_dec_2014
checksum: md5:538acd35c6cf6977fa19d21ab2c17b0a
alternative_priority: 200
is_default: false

# JDK for version 8 - update 40 - build 25
from_repo: false
implementation: OPENJDK
v_major: 8
v_minor: 40
build: 25
os: linux
arch: x64
date: 10_feb_2015
checksum: md5:4980716637f353cfb27467d57f2faf9b
alternative_priority: 300
is_default: false

# JDK for version 9 - update 0.4
from_repo: false
implementation: OPENJDK
v_major: 9
v_minor: 0.4
build:
os: linux
arch: x64
checksum: sha256:39362fb9bfb341fcc802e55e8ea59f4664ca58fd821ce956d48e1aa4fb3d2dec
alternative_priority: 400
is_default: false

# JDK for version 10 - update 0.2 - build 13
from_repo: false
implementation: OPENJDK
v_major: 10
v_minor: 0.2
build: 13
hash: 19aef61b38124481863b1413dce1855f
os: linux
arch: x64
checksum: sha256:f3b26abc9990a0b8929781310e14a339a7542adfd6596afb842fa0dd7e3848b2
alternative_priority: 600
is_default: false

# JDK for version 11 - update 0.1 - build 13
from_repo: false
implementation: OPENJDK
v_major: 11
v_minor: 0.1
build: 13
os: linux
arch: x64
checksum: sha256:7a6bb980b9c91c478421f865087ad2d69086a0583aeeb9e69204785e8e97dcfd
alternative_priority: 800
is_default: true

This guide provides a straightforward way to configure and install Java using Ansible on various Linux distributions.

Installa
ansible-galaxy install jetune.java
Licenza
apache-2.0
Download
2.1k
Proprietario