2015-10-04 04:19:50 +08:00
|
|
|
---
|
2016-06-27 03:14:45 +08:00
|
|
|
- include_vars: kube_versions.yml
|
|
|
|
|
2016-05-23 06:25:52 +08:00
|
|
|
- name: downloading...
|
|
|
|
debug:
|
|
|
|
msg: "{{ download.url }}"
|
|
|
|
when: "{{ download.enabled|bool }}"
|
|
|
|
|
2015-12-31 23:05:25 +08:00
|
|
|
- name: Create dest directories
|
2016-05-23 06:25:52 +08:00
|
|
|
file: path={{local_release_dir}}/{{download.dest|dirname}} state=directory recurse=yes
|
|
|
|
when: "{{ download.enabled|bool }}"
|
2016-05-18 12:30:01 +08:00
|
|
|
run_once: "{{ download_run_once|bool }}"
|
2015-12-31 23:05:25 +08:00
|
|
|
|
|
|
|
- name: Download items
|
|
|
|
get_url:
|
2016-05-23 06:25:52 +08:00
|
|
|
url: "{{download.url}}"
|
|
|
|
dest: "{{local_release_dir}}/{{download.dest}}"
|
|
|
|
sha256sum: "{{download.sha256 | default(omit)}}"
|
|
|
|
owner: "{{ download.owner|default(omit) }}"
|
|
|
|
mode: "{{ download.mode|default(omit) }}"
|
|
|
|
when: "{{ download.enabled|bool }}"
|
2016-05-18 12:30:01 +08:00
|
|
|
run_once: "{{ download_run_once|bool }}"
|
2015-12-31 23:05:25 +08:00
|
|
|
|
|
|
|
- name: Extract archives
|
|
|
|
unarchive:
|
2016-05-23 06:25:52 +08:00
|
|
|
src: "{{ local_release_dir }}/{{download.dest}}"
|
|
|
|
dest: "{{ local_release_dir }}/{{download.dest|dirname}}"
|
|
|
|
owner: "{{ download.owner|default(omit) }}"
|
|
|
|
mode: "{{ download.mode|default(omit) }}"
|
2016-01-26 03:30:48 +08:00
|
|
|
copy: no
|
2016-05-23 06:25:52 +08:00
|
|
|
when: "{{ download.enabled|bool }} and ({{download.unarchive is defined and download.unarchive == True}})"
|
2016-05-18 12:30:01 +08:00
|
|
|
run_once: "{{ download_run_once|bool }}"
|
2016-01-26 03:30:48 +08:00
|
|
|
|
|
|
|
- name: Fix permissions
|
|
|
|
file:
|
|
|
|
state: file
|
2016-05-23 06:25:52 +08:00
|
|
|
path: "{{local_release_dir}}/{{download.dest}}"
|
|
|
|
owner: "{{ download.owner|default(omit) }}"
|
|
|
|
mode: "{{ download.mode|default(omit) }}"
|
|
|
|
when: "{{ download.enabled|bool }} and ({{download.unarchive is not defined or download.unarchive == False}})"
|
2016-05-18 12:30:01 +08:00
|
|
|
run_once: "{{ download_run_once|bool }}"
|