Ansible: Install Oracle Java
Contents
Date
15.11.2016Reading time
1 MinutesComments
0 commentsTags
- ansible
- java
Contents
Most of my machines are provisioned through Ansible and also most require a running JDK. To support this process, I created an Ansible Role to install the JDK.
Installation
You can either use ansible-galaxy to install this role:
ansible-galaxy install deveth0.oracle-java
Or checkout this git-repository to your roles directory:
git clone https://github.com/deveth0/ansible-oracle-java.git deveth0.oracle_java
Variables
You can configure which java-version to use:
oracle_java_version: 8
By default the Java environment variables are set:
oracle_java_set_default: True
Example
- hosts: foo
roles: - role: deveth0.oracle-java
oracle_java_version: 7
Comments