idealista/java_role

Unable to download Oracle Java 1.8.0_191

mmolinac opened this issue · 5 comments

Prerequisites

Description

The role is unable to download default Oracle Java version from their site.

Steps to Reproduce

  1. Use the role with the following syntax:
- include_role:
    name: idealista.java_role
  vars:
    java_implementation: 'oraclejdk'

You can also use it with the latest version available inside the role:

- include_role:
    name: idealista.java_role
  vars:
    java_implementation: 'oraclejdk'
    java_oracle_jdk_version: '1.8.0_192'
  1. I've run my playbook.

Expected behavior: [What you expect to happen]
Oracle Java downloaded and installed with default values.

Actual behavior: [What actually happens]

I get the following error:

TASK [idealista.java_role : Java | Download .tar.gz file containing binaries from Oracle website] **************************************
Wednesday 16 January 2019  15:39:48 +0100 (0:00:00.863)       0:03:33.792 ***** 
[DEPRECATION WARNING]: Supplying `headers` as a string is deprecated. Please use dict/hash format for `headers`. This feature will be 
removed in version 2.10. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
fatal: [myhost02]: FAILED! => {"changed": false, "dest": "/tmp/jdk-1.8.0_191.tar.gz", "msg": "Request failed", "response": "HTTP Error 404: Not Found", "state": "absent", "status_code": 404, "url": "http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz"}

And it's the same with version 1.8.0_192.

Reproduces how often: [What percentage of the time does it reproduce?]
All the times.

Versions

Current master branch version.

Additional Information

ansible 2.7.5
  config file = None
  configured module search path = ['/Users/mmolinac/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/2.7.5/libexec/lib/python3.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.2 (default, Jan 13 2019, 12:50:01) [Clang 10.0.0 (clang-1000.11.45.5)]

Wonderful. It looks like Oracle has deprecated those versions for _201 and _202.

I think we're gonna release a role version without the URLs in vars/main.yml so they can be overwritten easily.

@jnogol I've just submitted you a PR with _201 working now.

And _202, now that you mentioned it.

I don't know if you are already aware that Oracle's public distribution policy about JDKs have changed recently. They're charging now for the service of getting older JDK versions.
I'm thinking about a way of downloading automatically at least the latest version from their website, parsing the page.
In the meantime, you can expect several PR changing available versions every time they delete the older ones from their front page.

@mmolinac your changes are available in the release 3.4.2

Thanks for your contribution