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

azcopy_sha256 not verified #10

Open
diepes opened this issue Jan 28, 2023 · 2 comments
Open

azcopy_sha256 not verified #10

diepes opened this issue Jan 28, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@diepes
Copy link

diepes commented Jan 28, 2023

It does not seem like the current role verifies the downloaded sha256.

azcopy_sha256: not used ?

@diepes
Copy link
Author

diepes commented Jan 28, 2023

Maybe something like this ?

- name: "[sh] Get chksum of azcopy"
  ansible.builtin.stat:
    path : "{{ azcopy_bin_path }}/azcopy"
  register: chksum_azcopy
  check_mode: yes

- name: "[sh] Compare chksum of azcopy"
  debug:
    msg: "File Compare azcopy  failed got:{{ chksum_azcopy.stat }} for azcopy"
  failed_when:                                      chksum_azcopy.stat.checksum != '{{ azcopy_sha256 }}'
  when: ( chksum_azcopy.stat.exists == true ) and ( chksum_azcopy.stat.checksum != '{{ azcopy_sha256 }}' )
  check_mode: yes

@eduardolmedeiros eduardolmedeiros added the enhancement New feature or request label Feb 12, 2023
@eduardolmedeiros
Copy link
Owner

This is a leftover from when I was using the get_url module.
Indeed. I need to improve that, it is just a shame that Microsoft does not provide any checksum URL on their end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants