jonathanio.java
Ansible Java
A role to install Java packages. It currently supports:
- OpenJDK on either Ubunu/Debian, or CentOS/RHEL; or
- Oracle on Ubuntu/Debian.
Requirements
None.
Role Variables
java_type: Can either beopenjdkororacleto install the selected type of Java on the system. Note: At this timeoracleis only supported on Ubuntu or Debian systems.java_version: The version of the JDK to install; either6,7,8, or9. Not all versions are supports on all types for all releases and distributions.java_debain_oracle_accept_licence: If you are running on aDebian(orUbuntusystem), then you will need to accept a licence as part of the install process. This is set tonoby default, so you will need to set this in the appropriategroup_vars/orhost_vars/file (or the play) to allowdebconfto set the propery and therefore allow Oracle Java to be installed.
Example Playbook
Here are some examples on how to use this role:
- hosts: all
vars:
java_type: openjdk
java_version: 8
roles:
- java
- hosts: debian
vars:
java_debain_oracle_accept_licence: yes
roles:
- { role: java, java_type: oracle, java_version: 9 }
License
This project is under the BSD License. See the LICENSE file for the full license text.
Author Information
Jonathan Wright jon@than.io
About
Install and configure Oracle or OpenJDK Java, with test-kitchen/serverspec tests.
Install
ansible-galaxy install jonathanio.javaLicense
bsd-3-clause
Downloads
253
Owner
Linux/Cloud Guru, DevOps fan, knows a bit of many things! AWS artisan, Terraform technician, Ansible agent, and Packer professional.
