You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2 KiB

  1. ---
  2. - name: Create the checksum file
  3. lineinfile:
  4. create: yes
  5. dest: "{{ role_path }}/{{ kube_version }}_k8s-sha256"
  6. line: '{{item.name}}:{{item.sha256}}'
  7. with_items: '{{downloads}}'
  8. when: item.name in ["kubernetes-kubelet", "kubernetes-kubectl", "kubernetes-apiserver"]
  9. - name: Upload checksum file on GS
  10. gc_storage:
  11. bucket: kargo
  12. object: "{{ kube_version }}_k8s-sha256"
  13. src: "{{ role_path }}/{{ kube_version }}_k8s-sha256"
  14. mode: put
  15. permission: public-read
  16. gs_access_key: "changeme"
  17. gs_secret_key: "changeme"
  18. - name: Create dest directories
  19. file: path={{local_release_dir}}/{{item.dest|dirname}} state=directory recurse=yes
  20. with_items: '{{downloads}}'
  21. - name: Download items
  22. get_url:
  23. url: "{{item.source_url}}"
  24. dest: "{{local_release_dir}}/{{item.dest}}"
  25. sha256sum: "{{item.sha256 | default(omit)}}"
  26. owner: "{{ item.owner|default(omit) }}"
  27. mode: "{{ item.mode|default(omit) }}"
  28. with_items: '{{downloads}}'
  29. - name: uploads items
  30. gc_storage:
  31. bucket: kargo
  32. object: "{{item.version}}_{{item.name}}"
  33. src: "{{ local_release_dir }}/{{item.dest}}"
  34. mode: put
  35. permission: public-read
  36. gs_access_key: "changeme"
  37. gs_secret_key: "changeme"
  38. with_items: '{{downloads}}'