An Ansible Role that installs Java on RedHat/CentOS or Debian/Ubuntu.
None
None
---
- hosts: all
become: true
roles:
- { role: jgeusebroek.java, tags: ["java"] }
java_packages:
- java-1.8.0-openjdk
When omitted defaults to:
openjdk-8-jdk (Debian/Ubuntu)
java-1.7.0-openjdk (Redhat/CentOS)
Should you need another Java version, make sure this version is available for the distribution package manager and define the java_packages
variable.
For example using the Debian Backports repository install Java 8 with the openjdk-8-jdk
package.
MIT / BSD
This role was created in 2017 by Jeroen Geusebroek. Forked from Jeff Geerling's Java role.