Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General role behaviour Debian vs RedHat #105

Open
peshay opened this issue Nov 22, 2018 · 1 comment
Open

General role behaviour Debian vs RedHat #105

peshay opened this issue Nov 22, 2018 · 1 comment
Labels

Comments

@peshay
Copy link
Contributor

peshay commented Nov 22, 2018

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 peshay changed the title General role behaviour General role behaviour Debian vs RedHat Nov 22, 2018
@steenzout
Copy link
Member

steenzout commented Nov 24, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants