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.

41 lines
1.4 KiB

9 years ago
  1. ---
  2. - include_vars: kube_versions.yml
  3. - name: downloading...
  4. debug:
  5. msg: "{{ download.url }}"
  6. when: "{{ download.enabled|bool }}"
  7. - name: Create dest directories
  8. file: path={{local_release_dir}}/{{download.dest|dirname}} state=directory recurse=yes
  9. when: "{{ download.enabled|bool }}"
  10. run_once: "{{ download_run_once|bool }}"
  11. - name: Download items
  12. get_url:
  13. url: "{{download.url}}"
  14. dest: "{{local_release_dir}}/{{download.dest}}"
  15. sha256sum: "{{download.sha256 | default(omit)}}"
  16. owner: "{{ download.owner|default(omit) }}"
  17. mode: "{{ download.mode|default(omit) }}"
  18. when: "{{ download.enabled|bool }}"
  19. run_once: "{{ download_run_once|bool }}"
  20. - name: Extract archives
  21. unarchive:
  22. src: "{{ local_release_dir }}/{{download.dest}}"
  23. dest: "{{ local_release_dir }}/{{download.dest|dirname}}"
  24. owner: "{{ download.owner|default(omit) }}"
  25. mode: "{{ download.mode|default(omit) }}"
  26. copy: no
  27. when: "{{ download.enabled|bool }} and ({{download.unarchive is defined and download.unarchive == True}})"
  28. run_once: "{{ download_run_once|bool }}"
  29. - name: Fix permissions
  30. file:
  31. state: file
  32. path: "{{local_release_dir}}/{{download.dest}}"
  33. owner: "{{ download.owner|default(omit) }}"
  34. mode: "{{ download.mode|default(omit) }}"
  35. when: "{{ download.enabled|bool }} and ({{download.unarchive is not defined or download.unarchive == False}})"
  36. run_once: "{{ download_run_once|bool }}"