Skip to content

Commit 4f3423b

Browse files
author
Derek
committed
fix(gnome): upgrade pip/pipx in-place instead of removing distro packages
Just upgrade pip and pipx to latest using pip - this overwrites the older distro versions in-place without needing to remove them first.
1 parent f2cf189 commit 4f3423b

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

ansible/roles/dfe_developer/tasks/gnome_common.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,14 @@
5050

5151
# Distro-packaged pipx can be outdated (Ubuntu 24.04 has 1.4.3).
5252
# community.general.pipx requires >= 1.7.0 for application parameter.
53-
# Remove distro pipx and install via pip to /usr/local (system-wide, latest version)
54-
- name: Remove distro-packaged pipx (outdated version) - Ubuntu
55-
ansible.builtin.apt:
56-
name: pipx
57-
state: absent
58-
when: ansible_facts['distribution'] == 'Ubuntu'
59-
60-
- name: Remove distro-packaged pipx (outdated version) - Fedora
61-
ansible.builtin.dnf:
62-
name: pipx
63-
state: absent
64-
when: ansible_facts['distribution'] == 'Fedora'
53+
# Upgrade pip and pipx to latest - pip overwrites older distro versions in-place
54+
- name: Upgrade pip to latest
55+
ansible.builtin.pip:
56+
name: pip
57+
state: latest
58+
when: ansible_facts['distribution'] in ['Ubuntu', 'Fedora']
6559

66-
- name: Install pipx via pip system-wide (latest version)
60+
- name: Upgrade pipx to latest
6761
ansible.builtin.pip:
6862
name: pipx
6963
state: latest

0 commit comments

Comments
 (0)