uv packages installation improvement

This commit is contained in:
Ivan Golikov 2025-01-16 18:05:34 +01:00
parent 26737e89b4
commit fea1aa7b7c

View file

@ -25,14 +25,20 @@
apt_packages: apt_packages:
- fd-find - fd-find
uv_tools_default_python: '3.12'
uv_packages: uv_packages:
- aider-chat # python 3.12 is used by default
- asciinema # if package requires another version, specify item
- poetry # - name: numpy
- basedpyright # python: 3.8
- pre-commit - name: aider-chat
- posting - name: asciinema
- ipython - name: poetry
- name: basedpyright
- name: pre-commit
- name: posting
- name: ipython
macos_fish_path: /usr/local/bin/fish macos_fish_path: /usr/local/bin/fish
arch_fish_path: /usr/bin/fish arch_fish_path: /usr/bin/fish
@ -113,7 +119,9 @@
state: absent state: absent
- name: Install uv packages - name: Install uv packages
ansible.builtin.command: "uv tool install {{ item }}" ansible.builtin.command: "uv tool install --python {{ item.python | default(uv_tools_default_python) }} {{ item.name }}"
register: uv_install_result
changed_when: "'is already installed' not in uv_install_result.stderr"
loop: "{{ uv_packages }}" loop: "{{ uv_packages }}"
tags: tags:
- dev_tools - dev_tools