oracle-java icon indicating copy to clipboard operation
oracle-java copied to clipboard

General role behaviour Debian vs RedHat

Open peshay opened this issue 5 years ago • 1 comments

If this role runs on Debian it will install the latest version of Oracle JDK due to state=latest For RedHat it will install whatever version is defined in defaults or someone changes the variables to another specific version. I like to provide a change here as pull request. Either

  • the role will also for RedHat get the latest version installed by default or
  • it stays as it is now, but when an additional variable is set, it will change the default variables to reflect the latest available version. (oracle_java_latest = True)

peshay avatar Nov 22 '18 11:11 peshay

I actually don't like installing latest version since it makes harder to make a playbook run or environment reproducible.

I prefer writing roles that install specific versions but the simplest solution at the time was to use someone else's apt repo so it started like this and has stayed like this.

At a certain point in time, someone provided some code to parse the Oracle to determine the latest version for RedHat only for this code to get broken when the pattern changed.

Debian installation also got broken after Java 10 was released until someone created a new apt repo only for it to be broken again when Java 11 came out.

To be honest, I'd prefer if Debian got the same behavior as RedHat: revamp variables, specify version and install a specific version.

I'm not opposed to let users have the possibility to use latest, at their own risk, with the caveat that no Oracle page parsing is done in this role.

Using some auxiliary scripts (initial work done here) the latest version could be captured and the defaults/<os_family>.yml get updated through cron, CI pipeline, manually, etc? every new release of Java would require a new version of this role but I don't see this as a bad thing.

The user could also use the auxiliary library above and inject the oracle_java variables into the playbook run. For the package download this can be very important since downloading it from the web, with the default value, can cause a playbook run to break due to timeouts or firewall issues and hinder their ability to patch or provision a system. This alternative is already available for any user to explore in RedHat but not in Debian and making the Debian install more like the RedHat one, I think, is the way to go.

steenzout avatar Nov 24 '18 08:11 steenzout