blob: 46250de131ae2782c5eb370b4393544586ff7b71 [file] [log] [blame]
Mohammed Naserc7276c82025-02-14 12:22:57 -05001- name: Download and extract Depot
2 block:
3 - name: Create a temporary file
4 ansible.builtin.tempfile:
5 prefix: hatch
6 suffix: .tar.gz
7 state: file
8 register: ensure_hatch_tar
9
10 - name: Download Hatch release
11 ansible.builtin.get_url:
12 url: https://github.com/pypa/hatch/releases/download/hatch-v{{ ensure_hatch_version }}/hatch-x86_64-unknown-linux-gnu.tar.gz
13 dest: "{{ ensure_hatch_tar.path }}"
14 force: true
15
16 - name: Extract into {{ ensure_hatch_path }}
17 become: true
18 ansible.builtin.unarchive:
19 src: "{{ ensure_hatch_tar.path }}"
20 dest: "{{ ensure_hatch_path }}"
21 remote_src: yes
22 always:
23 - name: Remove the temporary file
24 ansible.builtin.file:
25 path: "{{ ensure_hatch_tar.path }}"
26 state: absent
27
28- name: Assert that Hatch is functional
29 ansible.builtin.command: hatch --version