Java will automatically be installed if you enabled any of the installed_extras that depend on it. If you have any other use case for installing it, just make sure java is in the list of installed_extras in your config.yml.

For a list of available role variables, see the Ansible role's README.