Ansible role to deploy/setup Java on ubuntu
java_open_jdk_set_version: '8'
java_oracle_jdk_version: '1.8.0_181'
To set multiple versions
java_open_jdk_version: ['6', '7', '8']
To set system defaults
java_open_jdk_set_version: '8'
- hosts: java
roles:
- role: ansible-java
become: true