Mohammed Naser | e70062f | 2025-01-28 18:15:17 -0500 | [diff] [blame^] | 1 | - name: Download and extract Depot |
| 2 | block: |
| 3 | - name: Create a temporary file |
| 4 | ansible.builtin.tempfile: |
| 5 | prefix: depot |
| 6 | suffix: .tar.gz |
| 7 | state: file |
| 8 | register: depot_tar |
| 9 | |
| 10 | - name: Download Depot release |
| 11 | ansible.builtin.get_url: |
| 12 | url: "https://dl.depot.dev/cli/download/{{ ansible_system | lower }}/{{ ansible_architecture | lower }}/latest" |
| 13 | dest: "{{ depot_tar.path }}" |
| 14 | force: true |
| 15 | |
| 16 | - name: Extract into {{ ensure_depot_path }} |
| 17 | become: true |
| 18 | ansible.builtin.unarchive: |
| 19 | src: "{{ depot_tar.path }}" |
| 20 | dest: "{{ ensure_depot_path }}" |
| 21 | remote_src: yes |
| 22 | extra_opts: --strip-components=1 |
| 23 | always: |
| 24 | - name: Remove the temporary file |
| 25 | ansible.builtin.file: |
| 26 | path: "{{ depot_tar.path }}" |
| 27 | state: absent |