c12s-kubespray/roles/download/tasks/main.yml

22 lines
664 B
YAML
Raw Normal View History

2015-10-03 20:19:50 +00:00
---
2015-12-31 15:05:25 +00:00
- name: Create dest directories
file: path={{local_release_dir}}/{{item.dest|dirname}} state=directory recurse=yes
with_items: downloads
- name: Download items
get_url:
url: "{{item.url}}"
dest: "{{local_release_dir}}/{{item.dest}}"
sha256sum: "{{item.sha256 | default(omit)}}"
2016-01-22 15:37:07 +00:00
owner: "{{ item.owner|default(omit) }}"
mode: "{{ item.mode|default(omit) }}"
2015-12-31 15:05:25 +00:00
with_items: downloads
- name: Extract archives
unarchive:
src: "{{ local_release_dir }}/{{item.dest}}"
dest: "{{ local_release_dir }}/{{item.dest|dirname}}"
copy: no
when: "{{item.unarchive is defined and item.unarchive == True}}"
with_items: downloads