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

redhat: download failing #90

Closed
sfeltman opened this issue Aug 1, 2018 · 4 comments
Closed

redhat: download failing #90

sfeltman opened this issue Aug 1, 2018 · 4 comments
Assignees
Milestone

Comments

@sfeltman
Copy link

sfeltman commented Aug 1, 2018

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"}
@BalazsGyarmati
Copy link

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"}

@steenzout
Copy link
Member

@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.

@steenzout steenzout self-assigned this Aug 19, 2018
@steenzout steenzout added this to the 6.20.0 milestone Aug 19, 2018
@steenzout steenzout changed the title Failing task "define download page URL based on latest version" redhat: download failing Aug 19, 2018
@steenzout steenzout added fix and removed question labels Aug 19, 2018
@steenzout
Copy link
Member

fixed on https:/ansiblebit/oracle-java/releases/tag/6.22.0.

please report any new problems you may find.

thank you!

@BalazsGyarmati
Copy link

@steenzout thanks for the fix, it works for me

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

No branches or pull requests

3 participants