2016-03-05 00:39:02 +08:00
|
|
|
---
|
2016-05-11 23:37:15 +08:00
|
|
|
- name: Create the checksum file
|
|
|
|
lineinfile:
|
|
|
|
create: yes
|
|
|
|
dest: "{{ role_path }}/{{ kube_version }}_k8s-sha256"
|
|
|
|
line: '{{item.name}}:{{item.sha256}}'
|
|
|
|
with_items: '{{downloads}}'
|
|
|
|
when: item.name in ["kubernetes-kubelet", "kubernetes-kubectl", "kubernetes-apiserver"]
|
|
|
|
|
|
|
|
- name: Upload checksum file on GS
|
|
|
|
gc_storage:
|
|
|
|
bucket: kargo
|
|
|
|
object: "{{ kube_version }}_k8s-sha256"
|
|
|
|
src: "{{ role_path }}/{{ kube_version }}_k8s-sha256"
|
|
|
|
mode: put
|
|
|
|
permission: public-read
|
|
|
|
gs_access_key: "changeme"
|
|
|
|
gs_secret_key: "changeme"
|
|
|
|
|
2016-03-05 00:39:02 +08:00
|
|
|
- name: Create dest directories
|
|
|
|
file: path={{local_release_dir}}/{{item.dest|dirname}} state=directory recurse=yes
|
2016-04-11 18:19:09 +08:00
|
|
|
with_items: '{{downloads}}'
|
2016-03-05 00:39:02 +08:00
|
|
|
|
|
|
|
- name: Download items
|
|
|
|
get_url:
|
|
|
|
url: "{{item.source_url}}"
|
|
|
|
dest: "{{local_release_dir}}/{{item.dest}}"
|
|
|
|
sha256sum: "{{item.sha256 | default(omit)}}"
|
|
|
|
owner: "{{ item.owner|default(omit) }}"
|
|
|
|
mode: "{{ item.mode|default(omit) }}"
|
2016-04-11 18:19:09 +08:00
|
|
|
with_items: '{{downloads}}'
|
2016-03-05 00:39:02 +08:00
|
|
|
|
|
|
|
- name: uploads items
|
|
|
|
gc_storage:
|
2016-04-19 23:25:19 +08:00
|
|
|
bucket: kargo
|
2016-03-05 00:39:02 +08:00
|
|
|
object: "{{item.version}}_{{item.name}}"
|
|
|
|
src: "{{ local_release_dir }}/{{item.dest}}"
|
|
|
|
mode: put
|
|
|
|
permission: public-read
|
|
|
|
gs_access_key: "changeme"
|
|
|
|
gs_secret_key: "changeme"
|
2016-04-11 18:19:09 +08:00
|
|
|
with_items: '{{downloads}}'
|