This role provide a compliance for install java on your target host.
This role was developed using Ansible 2.4 Backwards compatibility is not guaranteed.
Use ansible-galaxy install diodonfrost.java
to install the role on your system.
Supported platforms:
- name: EL
versions:
- 8
- 7
- 6
- 5
- name: Fedora
versions:
- 32
- 31
- 30
- 29
- 28
- 27
- 26
- name: Debian
versions:
- buster
- stretch
- jessie
- wheezy
- squeeze
- name: Ubuntu
versions:
- focal
- disco dingo
- bionic
- xenial
- trusty
- precise
- trusty
- name: OracleLinux
versions:
- 7
- 6
- name: Amazon
versions:
- 2017.12
- 2016.03
- 2013.09
- name: opensuse
versions:
- 15.1
- 15
- 42.3
- 42.2
- 42.1
- 13.2
- name: SLES
versions:
- 11
- 12
- name: ArchLinux
versions:
- any
- name: Alpine
versions:
- any
- name: Gentoo
versions:
- any
- name: ClearLinux
versions:
- any
- name: FreeBSD
versions:
- 11.2
- 10.4
- 10.3
- name: OpenBSD
versions:
- 6.0
- 6.4
- name: Solaris
versions:
- 10
- 11.0
- name: MacOSX
versions:
- 10.10
- 10.11
- 10.12
- 10.13
- name: Windows
versions:
- 2016
- 2012R2
- 2008R2
- 8.1
This role has multiple variables. The defaults for all these variables are the following:
---
# defaults file for ansible-role-java
# Specify java version to install
# Depends on the operating system
# Accepted value: 6,7,8,9,10,11,12,13,latest
# latest take latest version of java supported by operating system
# Default latest
java_version: latest
# Install java virtual machine
# Default is true
openjre_install: true
# Install java virtual machine and development kit for java
# Default is false
openjdk_install: false
None
This is a sample playbook file for deploying the Ansible Galaxy java role in a localhost and installing openjdk-jre.
---
- hosts: localhost
become: true
roles:
- role: diodonfrost.java
The preferred way of locally testing the role is to use Docker. You will have to install Docker on your system.
You can also use Virtualbox with kitchen-ci to run tests locally. You will have to install Virtualbox and Vagrant on your system. For all our tests we use test-kitchen.
Next install test-kitchen:
# Install dependencies
gem install bundler
bundle install
# List all tests with kitchen
kitchen list
# fast test on one machine
kitchen test default-centos-7
# test on all machines
kitchen test
# for development, create environment
kitchen create default-centos-7
# Apply ansible playbook
kitchen converge default-centos-7
# Apply inspec tests
kitchen verify default-centos-7
# Specify kitchen file on Linux
export KITCHEN_YAML=.kitchen-vagrant.yml
# fast test on one machine
kitchen test os-packaging-freebsd-112
Windows and Solaris can only be test with Virtualbox provider,do not use 'kitchen test' command for testing Windows and Solaris environment. There 4 steps you will be using with test-kitchen as part of your workflow.
First of all we must set the kitchen file:
# For testing Windows
export KITCHEN_YAML=.kitchen-windows.yml
# For testing Solaris
export KITCHEN_YAML=.kitchen-solaris.yml
Provision the virtual machines, a Linux machine to run Ansible and Windows/Solaris machines to apply playbook again:
# deploy machines
kitchen create
# Launch playbook
kitchen converge
Finaly launch inspec tests:
kitchen verify
For cleaning environment use:
kitchen destroy
Apache 2
Openjdk version compatibility operating system:
distribution | release | java_version |
---|---|---|
CentOS | 8 | 8 & 11 |
CentOS | 7 | 6, 7 & 8 |
CentOS | 6 | 6, 7 & 8 |
Fedora | 32 | 8, 11 & 13 |
Fedora | 31 | 8, 11 & 13 |
Fedora | 30 | 8, 11 & 12 |
Fedora | 29 | 8 & 11 |
Fedora | 28 | 8 & 11 |
Fedora | 27 | 8 & 11 |
Fedora | 26 | 8 & 9 |
Ubuntu | 20.04 | 8,11,13 & 14 |
Ubuntu | 19.04 | 8,11,12 & 13 |
Ubuntu | 18.04 | 8 & 11 |
Ubuntu | 16.04 | 8 & 9 |
Ubuntu | 14.04 | 6 & 7 |
Ubuntu | 12.04 | 6 & 7 |
Debian | 10 | 11 |
Debian | 9 | 8 |
Debian | 8 | 8 |
Debian | 7 | 6 & 7 |
Oraclelinux | 7 | 6, 7, 8 & 11 |
Oraclelinux | 6 | 6, 7 & 8 |
Amazonlinux | 7 | 7 & 8 |
Amazonlinux | 6 | 6, 7 & 8 |
Opensuse | 15 | 8, 10 & 11 |
Opensuse | 42.3 | 7 & 8 |
Opensuse | 42.2 | 7 & 8 |
Opensuse | 42.1 | 7 & 8 |
Opensuse | 13.2 | 7 & 8 |
SLES | 15 | 8 |
SLES | 13 | 8 |
SLES | 12 | 8 |
Archlinux | rolling | 7, 8, 10 & 11 |
Gentoo | stage3 | 8 |
Alpinelinux | 3.9 | 7 & 8 |
FreeBSD | 11.3 | 6, 7 & 8 |
FreeBSD | 10.4 | 6, 7 & 8 |
OpenBSD | 6.x | 8 |
Solaris | 11 | 6, 7 ,8 |
Solaris | 10 | 7, 8 |
Macosx | 10.x | 8, 9, 11 |
Windows | 2k16 | 11 |
Windows | 2k12r2 | 11 |
Windows | 2k8r2 | 11 |
Windows | 8.1 | 11 |
This role was created in 2018 by diodonfrost.