Installing uv from binary on Ubuntu
This commit is contained in:
parent
522497cf33
commit
a28d20bc38
1 changed files with 40 additions and 1 deletions
|
@ -10,15 +10,16 @@
|
|||
- zoxide
|
||||
- git
|
||||
- tldr
|
||||
- uv
|
||||
|
||||
brew_packages:
|
||||
- difftastic
|
||||
- fd
|
||||
- uv
|
||||
|
||||
pacman_packages:
|
||||
- difftastic
|
||||
- fd
|
||||
- uv
|
||||
|
||||
apt_packages:
|
||||
- fd-find
|
||||
|
@ -72,6 +73,44 @@
|
|||
pkg: "{{ common_packages }}"
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Install uv (Ubuntu)
|
||||
when: is_ubuntu
|
||||
block:
|
||||
- name: Create a temporary directory
|
||||
ansible.builtin.tempfile:
|
||||
state: directory
|
||||
prefix: uv_temp_
|
||||
register: temp_dir
|
||||
|
||||
- name: Download uv tarball
|
||||
ansible.builtin.get_url:
|
||||
url: "https://github.com/astral-sh/uv/releases/download/0.5.16/uv-x86_64-unknown-linux-gnu.tar.gz"
|
||||
dest: "{{ temp_dir.path }}/uv.tar.gz"
|
||||
|
||||
- name: Unpack the tarball
|
||||
ansible.builtin.unarchive:
|
||||
src: "{{ temp_dir.path }}/uv.tar.gz"
|
||||
dest: "{{ temp_dir.path }}"
|
||||
remote_src: yes
|
||||
|
||||
- name: Ensure ~/.local/bin exists
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_env.HOME }}/.local/bin"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Move unpacked files to ~/.local/bin
|
||||
ansible.builtin.copy:
|
||||
src: "{{ temp_dir.path }}/uv-x86_64-unknown-linux-gnu/"
|
||||
dest: "{{ ansible_env.HOME }}/.local/bin/"
|
||||
remote_src: yes
|
||||
mode: '0755'
|
||||
|
||||
- name: Clean up temporary directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ temp_dir.path }}"
|
||||
state: absent
|
||||
|
||||
- name: Install uv packages
|
||||
ansible.builtin.command: "pipx tool install {{ item }}"
|
||||
loop: "{{ uv_packages }}"
|
||||
|
|
Loading…
Reference in a new issue