You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.0 KiB

9 years ago
  1. ---
  2. - name: Create dest directories
  3. file: path={{local_release_dir}}/{{item.dest|dirname}} state=directory recurse=yes
  4. with_items: downloads
  5. - name: Download items
  6. get_url:
  7. url: "{{item.url}}"
  8. dest: "{{local_release_dir}}/{{item.dest}}"
  9. sha256sum: "{{item.sha256 | default(omit)}}"
  10. owner: "{{ item.owner|default(omit) }}"
  11. mode: "{{ item.mode|default(omit) }}"
  12. with_items: downloads
  13. - name: Extract archives
  14. unarchive:
  15. src: "{{ local_release_dir }}/{{item.dest}}"
  16. dest: "{{ local_release_dir }}/{{item.dest|dirname}}"
  17. owner: "{{ item.owner|default(omit) }}"
  18. mode: "{{ item.mode|default(omit) }}"
  19. copy: no
  20. when: "{{item.unarchive is defined and item.unarchive == True}}"
  21. with_items: downloads
  22. - name: Fix permissions
  23. file:
  24. state: file
  25. path: "{{local_release_dir}}/{{item.dest}}"
  26. owner: "{{ item.owner|default(omit) }}"
  27. mode: "{{ item.mode|default(omit) }}"
  28. when: "{{item.unarchive is not defined or item.unarchive == False}}"
  29. with_items: downloads