From b302ab1aa2b2dbc052ac81c59df7946fec8ce814 Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Fri, 20 Feb 2026 16:00:45 +0100 Subject: [PATCH] update python package management --- tasks/packages.yml | 3 --- tasks/pip.yml | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/tasks/packages.yml b/tasks/packages.yml index b37d739..23ce514 100644 --- a/tasks/packages.yml +++ b/tasks/packages.yml @@ -18,9 +18,6 @@ - locales - net-tools - ncdu - - python3-pip - - python3-venv - - python3-xyz - rsync - rsyslog - screen diff --git a/tasks/pip.yml b/tasks/pip.yml index 0f78be8..400e3b0 100644 --- a/tasks/pip.yml +++ b/tasks/pip.yml @@ -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