Details
Description
Basic Info
Module Version: 7.1.1
Puppet Version: 6.24
OS Name/Version: Ubuntu 20.04
Describe your issue in as much detail as possible...
Desired Behavior:
The options used with the update-java-alternatives command should reflect what you have chosen as distribution.
Actual Behavior:
At the moment you can choose jdk or jre as diistribution.
Yet when using the java_alternative param, you would expect ALL related/etc/alternatives links to be corrected. But the init.pp:
$jre_flag = $use_java_package_name ?
{ /headless/ => '--jre-headless', default => '--jre' }and as such in the config.pp:
command => "update-java-alternatives --set ${java::use_java_alternative} ${java::jre_flag}",
The jre flag ALWAYS gets set which is incorrect. In jdk situation you would want the command update-java-alternatives ran without any flag so it's sets all related links.
I would propose:
OR to have the jre-flag option match the distribution
OR make the jre_flag a param that can be edited with hiera
I prefer option 1
Please take a moment and attach any relevant log output and/or manifests. This will help us immensely when troubleshooting the issue.