Skip to content

nhojpatrick/ansible-playbook-java-mac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Install JDK EA (Early Access) on MacOS

Install default jdk

$ ansible-playbook --ask-become-pass playbook.yaml

Will install the default playbook version. Check playbook for jdk_major and jdk_build to understand what version will be installed.

Install specific jdk

$ ansible-playbook --ask-become-pass --extra-vars "jdk_build=18" playbook.yaml

Will install a specified version. Check playbook for jdk_major and jdk_build to understand what version will be installed, but jdk_build will be taken from the command line.

Even a different major version

$ ansible-playbook --ask-become-pass --extra-vars "jdk_major=16 jdk_build=5" playbook.yaml

DIY version

$ ansible-playbook --ask-become-pass --extra-vars "jdk_major=1 jdk_build=8 jdk_dwnld_filename=jdk-11.0.8_osx-x64_bin.tar.gz jdk_dwnld_url=/Users/user/Downloads/jdk-11.0.8_osx-x64_bin.tar.gz jdk_archive_subdir=jdk-11.0.8.jdk java_dir_name=jdk-11.0.8.jdk" playbook.yaml

Troubleshoot

  • Install homebrew https://brew.sh/
  • Using brew install ansible
  • Using brew install gnu-tar will get around opening archive issue.

About

Install Java on Mac using Ansible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published