Install an OpenJDK GA build from jdk.java.net on Linux, macOS and Windows.
- Ansible 2.4+
- Windows targets:
ansible.windowsandcommunity.windowscollections
jdk_version(default25.0.2) — one of17.0.2,21.0.2,25.0.2install_jdk_in_user_dir_on_linux(defaultfalse) — install under the user's home dir instead of/opt
Add more versions via download_urls in vars/main.yml.
- name: Install JDK
hosts: all
roles:
- role: zhan9san.java
vars:
jdk_version: 25.0.2molecule test # linux
molecule test -s macos
molecule test -s windowsMIT