haxorof/ansible-role-docker-ce

Docker-compose download checksum verification fails.

janorn opened this issue · 5 comments

Version Information

Ansible: 2.9.27

Role: 3.7.2

Steps to Reproduce

Install latest precompiled docker-compose(2.10.0).

Expected Behavior

Download precompiled file and verify checksum.

Actual Behavior

Download of docker-compose works however the sha sum file is now only in the common file no separate files so this fails.
checksums.txt

References

https://github.com/docker/compose/releases/tag/v2.10.0

- name: Fetch docker-compose {{ _docker_compose_github_version }} SHA265 sum file
get_url:
url: "https://github.com/docker/compose/releases/download/\
{{ _docker_compose_github_version }}/docker-compose-{{ ansible_system }}-{{ ansible_architecture }}.sha256"
dest: "/tmp/ansible.docker-compose-sha256"
register: _github_docker_compose_shasum_file
changed_when: false
until: _github_docker_compose_shasum_file.status_code == 200
retries: 10
check_mode: no

This works from 2.10.0 unfortunatly not for 2.9.0.

---
- name: Test
  hosts: localhost
  connection: local
  tasks:
    - name: Download file with checksum url (sha256)
      get_url:
        url: https://github.com/docker/compose/releases/download/v2.10.0/docker-compose-linux-x86_64
        dest: /tmp/docker-compose
        checksum: sha256:https://github.com/docker/compose/releases/download/v2.10.0/checksums.txt

Thanks for reporting this and it is a bit annoying that they suddenly change the checksum related asset in that way. Make it harder to handle the different versions the way it is done today in this role. 😄

Will see if I will have a look at this this weekend or not.

Related to #147

Looking at the releases of docker-compose it seems they restored the sha256 file again now since release v2.10.1. Then I would not update this role just because v2.10.0 did not have the sha256 file. 😄