William-Yeh / ansible-oracle-java

An Ansible role that installs Oracle JDK, in the format for Ansible Galaxy.
https://galaxy.ansible.com/williamyeh/oracle-java/
Apache License 2.0
170 stars 133 forks source link

Update to support jdk 8u121 #58

Open hansdg1 opened 7 years ago

hansdg1 commented 7 years ago

Please add support for Oracle jdk 8u121. I tried specifying it manually using this, but it won't download.

  vars:
    java_version: 8
    java_subversion: 121
    java_build: 13

fatal: [XXX]: FAILED! => {"changed": false, "dest": "/tmp/jdk-8u121-linux-x64.rpm", "failed": true, "msg": "Request failed", "response": "HTTP Error 404: Not Found", "state": "absent", "status_code": 404, "url": "http://download.oracle.com/otn-pub/java/jdk/8u121-b13/jdk-8u121-linux-x64.rpm"}

madhead commented 7 years ago

Looks like they've changed the URL format: http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz ?

ITler commented 7 years ago

Hello @William-Yeh

do you still maintain this repo/ansible module?

Kind regards ITler

faizan002 commented 7 years ago

I, also, need 121 !!! :( Si there any chance to get this update?

doronshai commented 7 years ago

they indeed changed the path by adding new hash string before the rpm file name

http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm

ITler commented 7 years ago

The question is, if a PR would get merged, as this project seems to be abandoned. Contribution from William is long time ago, however implementing support of the new JAVA version might hopefully not be the problem.

ianhattendorf commented 7 years ago

For 8u131:

java_version: 8
java_subversion: 131
java_build_custom: 11
jdk_version_detail_custom: "{{ java_version }}u{{ java_subversion }}-b{{ java_build_custom }}"
jdk_tarball_hash: d54c1d3a095b4ff2b6607d096fa80163
jdk_tarball_url: "http://download.oracle.com/otn-pub/java/jdk/{{ jdk_version_detail_custom }}/{{ jdk_tarball_hash }}/{{ jdk_tarball_file }}"
bendem commented 7 years ago

That makes the JCE policy install fail with

TASK [williamyeh.oracle-java : Check if JCE is already installed] *****************************************************************************************************************************
fatal: [<snip>]: FAILED! => {"changed": false, "cmd": "/usr/lib/jvm/default-java/bin/jrunscript -e 'print (javax.crypto.Cipher.getMaxAllowedKeyLength(\"RC5\") >= 256);'", "delta": "0:00:00.047295", "end": "2017-04-29 11:58:59.280996", "failed": true, "rc": 127, "start": "2017-04-29 11:58:59.233701", "stderr": "/bin/sh: 1: /usr/lib/jvm/default-java/bin/jrunscript: not found", "stderr_lines": ["/bin/sh: 1: /usr/lib/jvm/default-java/bin/jrunscript: not found"], "stdout": "", "stdout_lines": []}
...ignoring

Nevermind that, it was an environment variable that was set wrong.

ianhattendorf commented 7 years ago

Yeah, you might need to play around with it more depending on your distro/config. I only tested on debian.

plaurin84 commented 7 years ago

Tester @ianhattendorf solution on ubuntu xenial. Works perfectly fine. Indeed, url format needs to be fixed.