Skip to content
Snippets Groups Projects
Commit d7c30a0f authored by Jörg Sachse's avatar Jörg Sachse
Browse files

fix: parse IBMSP checksum file on remote host instead of localhost to make the...

fix: parse IBMSP checksum file on remote host instead of localhost to make the tasks usable on Gitlab-CI
parent d9c096b9
Branches
No related tags found
No related merge requests found
......@@ -7,10 +7,18 @@
#delegate_to: 127.0.0.1
- name: >
Extract IBM TSM Client setup archive checksum from file. We want to use
this info later to verify the integrity of our download.
Extract IBM TSM Client setup archive checksum string from file. This looks
like
"e24735f2f2f88bedc93371eae507c14dccb8e7be2676794b53ad94674338d8a1 8.1.15.0-TIV-TSMBAC-LinuxX86.tar".
We want to use this info later to verify the integrity of our download.
ansible.builtin.slurp:
src: "/tmp/{{ tsm_version_long | default(tsm_default_version_long) }}.0-TIV-TSMBAC-LinuxX86.tar.sha256sum.txt"
register: checksum_slurp
# The Ansible split() function behaves exactly like Python's.
- name: parse checksum value from checksum string
ansible.builtin.set_fact:
tsm_checksum: "{{ lookup('file', '/tmp/'+ tsm_version_long | default(tsm_default_version_long) +'.0-TIV-TSMBAC-LinuxX86.tar.sha256sum.txt').split(' ')[0] | lower }}"
tsm_checksum: "{{ checksum_slurp['content'] | b64decode | split() | lower }}"
......@@ -29,9 +37,9 @@
url: "https://public.dhe.ibm.com/storage/tivoli-storage-management/maintenance/client/v8r1/Linux/LinuxX86/BA/{{ tsm_version_short | default(tsm_default_version_short) }}/{{ tsm_version_long | default(tsm_default_version_long) }}.0-TIV-TSMBAC-LinuxX86.tar"
dest: "/tmp/"
mode: "0644"
checksum: "sha256:{{ tsm_checksum | default(omit) }}"
checksum: "sha256:{{ tsm_checksum[0] | default(omit) }}"
when: (( not ibmsp_tar.stat.exists ) or
( not ibmsp_tar.stat.checksum == tsm_checksum ))
( not ibmsp_tar.stat.checksum == tsm_checksum[0] ))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment