summaryrefslogtreecommitdiffstats
path: root/roles/python
diff options
context:
space:
mode:
authorAhmed AbdelHalim <[email protected]>2025-10-20 01:55:06 +0200
committerAhmed AbdelHalim <[email protected]>2025-10-20 15:17:20 +0200
commit5430f814c62612f0693ad69e1b67c841febd9c8c (patch)
tree8eb138b6d87004d911257e7cb5783e0e5138bb88 /roles/python
parente5a6071529df8c2b697e1922be701b2adf6fc477 (diff)
Implement a better download/install for python, pihole and go role
Diffstat (limited to 'roles/python')
-rw-r--r--roles/python/tasks/main.yml7
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: