update python package management

This commit is contained in:
Ludovic Cartier
2026-02-20 16:00:45 +01:00
parent 717c98fa6c
commit b302ab1aa2
2 changed files with 10 additions and 11 deletions
-3
View File
@@ -18,9 +18,6 @@
- locales
- net-tools
- ncdu
- python3-pip
- python3-venv
- python3-xyz
- rsync
- rsyslog
- screen
+10 -8
View File
@@ -1,4 +1,14 @@
---
- name: python | install python3 packages
apt:
name: "{{ item }}"
state: present
with_items:
- python3-venv
- python3-pip
when:
- ansible_distribution == 'Debian'
- name: python | install package (legacy)
pip:
name:
@@ -9,14 +19,6 @@
- ansible_distribution == 'Debian'
- ansible_distribution_major_version | int < 12
- name: python | install python3-venv
apt:
name: python3-venv
state: present
when:
- ansible_distribution == 'Debian'
- ansible_distribution_major_version | int >= 12
- name: python | create venv directory
file:
path: /opt/python/venv