summaryrefslogtreecommitdiffstats
path: root/roles/python/tasks
diff options
context:
space:
mode:
authorAhmed AbdelHalim <[email protected]>2025-10-20 00:06:49 +0200
committerAhmed AbdelHalim <[email protected]>2025-10-20 00:48:59 +0200
commit61e0f270fe813786a1b97a91b6bbb18c506931b9 (patch)
treef7fc2ca0796f18d5f95fb3346feb7a931c8331e9 /roles/python/tasks
parent1dde88f02c95c2634523ba5ef4b7b45b40b68a95 (diff)
Refactor python role to remove homebrew dependency
Diffstat (limited to 'roles/python/tasks')
-rw-r--r--roles/python/tasks/main.yml17
1 files changed, 11 insertions, 6 deletions
diff --git a/roles/python/tasks/main.yml b/roles/python/tasks/main.yml
index b469c9d2..55f4e34a 100644
--- a/roles/python/tasks/main.yml
+++ b/roles/python/tasks/main.yml
@@ -2,10 +2,17 @@
- name: "Include OS-specific variables"
ansible.builtin.include_vars: "{{ ansible_os_family | lower }}.yml"
-- name: "Install uv"
- community.general.homebrew:
- name: "uv"
- state: "present"
+- name: "Download uv installer"
+ ansible.builtin.get_url:
+ url: "https://astral.sh/uv/install.sh"
+ dest: "/tmp/install_uv.sh"
+ mode: "0755"
+
+- name: "Run uv installer"
+ ansible.builtin.command:
+ cmd: "/tmp/install_uv.sh"
+ args:
+ creates: "{{ ansible_env.HOME }}/.local/bin/uv"
- name: "Add uv to shell profile"
ansible.builtin.blockinfile:
@@ -24,7 +31,5 @@
cmd: "uv python install {{ item }}"
args:
creates: "{{ ansible_env.HOME }}/.local/share/uv/python/cpython-{{ item }}*/bin/python{{ item }}"
- environment:
- PATH: "/home/linuxbrew/.linuxbrew/bin:{{ ansible_env.PATH }}"
loop: "{{ python_versions }}"
when: python_versions | length > 0