download: use full hash form (including hash alg)

Allow the use of different hashes, as support by the get_url
Ansible module.
Change the variable name accordingly to 'checksum' since it's not
exclusively sha256 anymore.
This commit is contained in:
Max Gautier
2025-01-14 09:16:03 +01:00
parent f6ae46c9d8
commit 800c84dcc9
2 changed files with 74 additions and 74 deletions

View File

@@ -62,7 +62,7 @@
dest: "{{ file_path_cached if download_force_cache else download.dest }}"
owner: "{{ omit if download_localhost else (download.owner | default(omit)) }}"
mode: "{{ omit if download_localhost else (download.mode | default(omit)) }}"
checksum: "{{ 'sha256:' + download.sha256 if download.sha256 else omit }}"
checksum: "{{ download.checksum }}"
validate_certs: "{{ download_validate_certs }}"
url_username: "{{ download.username | default(omit) }}"
url_password: "{{ download.password | default(omit) }}"