-
-
Notifications
You must be signed in to change notification settings - Fork 19
Description
I have spent at least an hour trying to troubleshoot why the cloudkraft.nexus.download module is failing with the following error.
TASK [cloudkrafter.nexus.nexus_oss : Download Nexus package] *******************
[ERROR]: Task failed: Module failed: Error determining download URL: The provided URL https://cdn.download.sonatype.com/repository/downloads-prod-group/3/nexus-3.85.0-03-linux-x86_64.tar.gz is not accessible
Origin: /builds/prymalnet/infrastructure-as-code/terraform/ansible/collections/ansible_collections/cloudkrafter/nexus/roles/nexus_oss/tasks/nexus_install.yml:34:3
32 when: nexus_version | length > 0
33
34 - name: Download Nexus package
^ column 3
fatal: [10.10.1.140]: FAILED! => {"changed": false, "download_url": "https://cdn.download.sonatype.com/repository/downloads-prod-group/3/nexus-3.85.0-03-linux-x86_64.tar.gz", "msg": "Error determining download URL: The provided URL https://cdn.download.sonatype.com/repository/downloads-prod-group/3/nexus-3.85.0-03-linux-x86_64.tar.gz is not accessible", "version": null}
I started by using no variable configurations in my playbook file, it it failed to "get latest" then I switched to forcing the version and download_url to be what was provided on the Sonatype website (https://download.sonatype.com/nexus/3/nexus-3.85.0-03-linux-x86_64.tar.gz), and finally identified that the link on the Sonatype website was directing to a CDN. So I tried to use that URL and I am still getting the same failure.
However, I added a ansible.builtin.get_url task to the playbook before the cloudkraft.nexus.nexus_oss role runs and the download from either URL works fine. So I tried one last option, I manually downloaded the Nexus package from their website and uploaded it to an apache fileserver in my network and used that URL in the nexus_download_url variable and the role worked wonderfully. This tells me there is an issue with the cloudkraft.nexus.download module when it comes to pulling from the Sonatype website.
I am curious what the module is for compared to the much more standard get_url module