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
|
2016-03-30 08:23:43 +00:00
|
|
|
with_items: "{{ downloads }}"
|
2016-05-18 04:30:01 +00:00
|
|
|
run_once: "{{ download_run_once|bool }}"
|
2015-12-31 15:05:25 +00:00
|
|
|
|
|
|
|
- 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) }}"
|
2016-03-30 08:23:43 +00:00
|
|
|
with_items: "{{ downloads }}"
|
2016-05-18 04:30:01 +00:00
|
|
|
run_once: "{{ download_run_once|bool }}"
|
2015-12-31 15:05:25 +00:00
|
|
|
|
|
|
|
- name: Extract archives
|
|
|
|
unarchive:
|
2016-01-25 19:30:48 +00:00
|
|
|
src: "{{ local_release_dir }}/{{item.dest}}"
|
|
|
|
dest: "{{ local_release_dir }}/{{item.dest|dirname}}"
|
2016-01-26 11:17:33 +00:00
|
|
|
owner: "{{ item.owner|default(omit) }}"
|
|
|
|
mode: "{{ item.mode|default(omit) }}"
|
2016-01-25 19:30:48 +00:00
|
|
|
copy: no
|
2015-12-31 15:05:25 +00:00
|
|
|
when: "{{item.unarchive is defined and item.unarchive == True}}"
|
2016-03-30 08:23:43 +00:00
|
|
|
with_items: "{{ downloads }}"
|
2016-05-18 04:30:01 +00:00
|
|
|
run_once: "{{ download_run_once|bool }}"
|
2016-01-25 19:30:48 +00:00
|
|
|
|
|
|
|
- name: Fix permissions
|
|
|
|
file:
|
|
|
|
state: file
|
|
|
|
path: "{{local_release_dir}}/{{item.dest}}"
|
|
|
|
owner: "{{ item.owner|default(omit) }}"
|
|
|
|
mode: "{{ item.mode|default(omit) }}"
|
|
|
|
when: "{{item.unarchive is not defined or item.unarchive == False}}"
|
2016-03-30 08:23:43 +00:00
|
|
|
with_items: "{{ downloads }}"
|
2016-05-18 04:30:01 +00:00
|
|
|
run_once: "{{ download_run_once|bool }}"
|