kubespray/roles/uploads/tasks/main.yml

28 lines
728 B
YAML
Raw Normal View History

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:
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
2016-07-03 20:14:09 +08:00
gs_access_key: 'changeme'
gs_secret_key: 'changeme'
2016-04-11 18:19:09 +08:00
with_items: '{{downloads}}'