Upgrade Ubuntu 22.04 to 24.04 (Inplace and Reinstall) #200
1 changed files with 13 additions and 0 deletions
13
roles/mgrote_pip_pre_tasks/tasks/main.yml
Normal file
13
roles/mgrote_pip_pre_tasks/tasks/main.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
# Remove EXTERNALLY-MANAGED file if we're on Debian12
|
||||
# Related issue: https://github.com/geerlingguy/ansible-role-pip/issues/57
|
||||
- name: Get python3 version installed
|
||||
ansible.builtin.command: python3 --version
|
||||
register: py3ver
|
||||
changed_when: false
|
||||
|
||||
- name: Remove EXTERNALLY-MANAGED
|
||||
ansible.builtin.file:
|
||||
path: /usr/lib/python3.11/EXTERNALLY-MANAGED
|
||||
state: absent
|
||||
when: py3ver is defined and py3ver.stdout.find("3.11") != -1
|
Loading…
Reference in a new issue