Skip to content

Commit 9779529

Browse files
author
Derek
committed
fix(gnome): upgrade pipx on Ubuntu before using pipx module
Ubuntu 24.04 ships pipx 1.4.3 but community.general.pipx module requires >= 1.7.0 for the application parameter. Upgrade pipx via pip --user before installing gnome-extensions-cli.
1 parent 51820bb commit 9779529

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

ansible/roles/dfe_developer/tasks/gnome_common.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@
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)
54+
ansible.builtin.pip:
55+
name: pipx
56+
state: latest
57+
extra_args: --user --break-system-packages
58+
become: false
59+
become_user: "{{ dfe_actual_user }}"
60+
when: ansible_facts['distribution'] == 'Ubuntu'
61+
5162
- name: Install gnome-extensions-cli via pipx
5263
community.general.pipx:
5364
name: gnome-extensions-cli
@@ -58,6 +69,7 @@
5869
environment:
5970
PIPX_HOME: "{{ dfe_user_home }}/.local/pipx"
6071
PIPX_BIN_DIR: "{{ dfe_user_home }}/.local/bin"
72+
PATH: "{{ dfe_user_home }}/.local/bin:{{ ansible_env.PATH }}"
6173
when: ansible_facts['distribution'] in ['Ubuntu', 'Fedora']
6274

6375
# ============================================================================

0 commit comments

Comments
 (0)