Skip to content

Commit

Permalink
Add task to update pipx-installed Python packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
damiendart committed Feb 26, 2024
1 parent bdda19a commit f652fb5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions roles/python_package/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@
register: __pipx_install
changed_when: __pipx_install.stdout is search('installed package')
loop: '{{ python_package__pipx_packages }}'

- name: 'Ensure user-wide Python packages installed with "pipx" are up-to-date'
ansible.builtin.command: "/home/{{ python_package__user }}/.local/bin/pipx upgrade {{ item | split('[') | first }}"
become: true
become_user: '{{ python_package__user }}'
register: __pipx_upgrade
changed_when: __pipx_upgrade.stdout is search('upgraded package')
loop: '{{ python_package__pipx_packages }}'

0 comments on commit f652fb5

Please sign in to comment.