redhat: download failing
Closed this issue · 4 comments
This task is failing after not using it for about 2 months.
It seems the role is a bit fragile due needing to parse links out of the Oracle website? Is there any way to specify direct download links so I can cache my own versions in Artifactory?
System is Fedora 23 (4.8.13-100.fc23.x86_64)
The role is being used as follows:
roles:
- role: ansiblebit.oracle-java
become: yes
oracle_java_version: 8
oracle_java_set_as_default: true
Full text of error:
TASK [ansiblebit.oracle-java : define download page URL based on latest version] *****************************************************************
[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|version_compare` use `result is version_compare`. This
feature will be removed in version 2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
fatal: [localhost]: FAILED! => {"msg": "The conditional check 'latest_java_page_and_version[1] | version_compare(oracle_java_version,'=')' failed. The error was: Version comparison: list object has no element 1\n\nThe error appears to have been in '<snip>/ansiblebit.oracle-java/tasks/redhat/main.yml': line 19, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: define download page URL based on latest version\n ^ here\n"}
Same error on
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.4.1708
Full error message:
TASK [ansiblebit.oracle-java : define download page URL based on latest version] ***************************************************************************************************************************
[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|version_compare` instead use `result is version_compare`. This feature will be removed in version 2.9. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
fatal: [localhost]: FAILED! => {"msg": "The conditional check 'latest_java_page_and_version[1] | version_compare(oracle_java_version,'=')' failed. The error was: Version comparison: list object has no element 1\n\nThe error appears to have been in '<snip>/ansiblebit.oracle-java/tasks/redhat/main.yml': line 19, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: define download page URL based on latest version\n ^ here\n"}
@sfeltman and @BalazsGyarmati I've tested the develop
branch against CentOS7 and it seems to install Oracle JDK 10 correctly.
I've removed some of the automation so if you want an older version of Java, you'll need to override some default variables.
lmk if it looks good on your end.
fixed on https://github.com/ansiblebit/oracle-java/releases/tag/6.22.0.
please report any new problems you may find.
thank you!
@steenzout thanks for the fix, it works for me