diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-10-20 01:55:06 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-10-20 15:17:20 +0200 |
| commit | 34039e4525b21534b20c3aa68a543e0b2d13dda1 (patch) | |
| tree | 8eb138b6d87004d911257e7cb5783e0e5138bb88 /roles/python/tasks/main.yml | |
| parent | a4892eed8d08dfb5aabd3ed5ba3c931353899b34 (diff) | |
Implement a better download/install for python, pihole and go role
Diffstat (limited to 'roles/python/tasks/main.yml')
| -rw-r--r-- | roles/python/tasks/main.yml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/roles/python/tasks/main.yml b/roles/python/tasks/main.yml index 55f4e34a..ddecbbbb 100644 --- a/roles/python/tasks/main.yml +++ b/roles/python/tasks/main.yml @@ -2,17 +2,24 @@ - name: "Include OS-specific variables" ansible.builtin.include_vars: "{{ ansible_os_family | lower }}.yml" +- name: "Check if uv binary exists" + ansible.builtin.stat: + path: "{{ ansible_env.HOME }}/.local/bin/uv" + register: python_uv_binary + - name: "Download uv installer" ansible.builtin.get_url: url: "https://astral.sh/uv/install.sh" dest: "/tmp/install_uv.sh" mode: "0755" + when: not python_uv_binary.stat.exists - name: "Run uv installer" ansible.builtin.command: cmd: "/tmp/install_uv.sh" args: creates: "{{ ansible_env.HOME }}/.local/bin/uv" + when: not python_uv_binary.stat.exists - name: "Add uv to shell profile" ansible.builtin.blockinfile: |
