Skip to content

Commit e41e605

Browse files
author
Derek
committed
fix(gnome): upgrade pip and pipx to latest on all distros
Distro-packaged pip/pipx can be outdated. Upgrade both to latest via pip --user before using pipx module. Applies to Ubuntu and Fedora.
1 parent 3823949 commit e41e605

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

ansible/roles/dfe_developer/tasks/gnome_common.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,26 @@
4848
changed_when: false
4949
when: ansible_facts['distribution'] in ['Ubuntu', 'Fedora']
5050

51-
# Ubuntu 24.04 ships pipx 1.4.3 but community.general.pipx requires >= 1.7.0
52-
# Upgrade pipx via pip before using the module
53-
- name: Upgrade pipx to latest (Ubuntu - apt version is too old)
51+
# Distro-packaged pip/pipx can be outdated. Upgrade to latest via pip.
52+
# --break-system-packages allows modifying system Python packages.
53+
# community.general.pipx requires >= 1.7.0 for application parameter.
54+
- name: Upgrade pip to latest
55+
ansible.builtin.pip:
56+
name: pip
57+
state: latest
58+
extra_args: --user --break-system-packages
59+
become: false
60+
become_user: "{{ dfe_actual_user }}"
61+
when: ansible_facts['distribution'] in ['Ubuntu', 'Fedora']
62+
63+
- name: Upgrade pipx to latest
5464
ansible.builtin.pip:
5565
name: pipx
5666
state: latest
5767
extra_args: --user --break-system-packages
5868
become: false
5969
become_user: "{{ dfe_actual_user }}"
60-
when: ansible_facts['distribution'] == 'Ubuntu'
70+
when: ansible_facts['distribution'] in ['Ubuntu', 'Fedora']
6171

6272
- name: Install gnome-extensions-cli via pipx
6373
community.general.pipx:

0 commit comments

Comments
 (0)