summaryrefslogtreecommitdiffstats
path: root/roles/python
diff options
context:
space:
mode:
Diffstat (limited to 'roles/python')
-rw-r--r--roles/python/meta/main.yml3
-rw-r--r--roles/python/tasks/main.yml17
2 files changed, 13 insertions, 7 deletions
diff --git a/roles/python/meta/main.yml b/roles/python/meta/main.yml
index 4cbc7559..20f1f049 100644
--- a/roles/python/meta/main.yml
+++ b/roles/python/meta/main.yml
@@ -1,6 +1,7 @@
---
dependencies:
- - role: "homebrew"
+ - role: "bash"
+ - role: "curl"
galaxy_info:
author: "a14m"
description: "Install uv and python (versions) on Linux distributions"
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