dd
This commit is contained in:
parent
51de5aa269
commit
d0008f406c
1 changed files with 12 additions and 4 deletions
|
@ -1,7 +1,15 @@
|
|||
---
|
||||
# Remove EXTERNALLY-MANAGED file if we're on Debian12
|
||||
# Related issue: https://github.com/geerlingguy/ansible-role-pip/issues/57
|
||||
- name: Remove EXTERNALLY-MANAGED
|
||||
# Remove EXTERNALLY-MANAGED file
|
||||
# Related issue: https://github.com/geerlingguy/ansible-role-pip/issues/57 + https://www.jeffgeerling.com/blog/2023/how-solve-error-externally-managed-environment-when-installing-pip3
|
||||
|
||||
- name: Get Python 3.X version
|
||||
ansible.builtin.command: python3 --version
|
||||
register: pyver
|
||||
changed_when: false
|
||||
failed_when: pyver.rc != 0
|
||||
|
||||
- name: Ignore PEP 668 because it's silly.
|
||||
ansible.builtin.file:
|
||||
path: /usr/lib/python3.11/EXTERNALLY-MANAGED
|
||||
state: absent
|
||||
path: "/usr/lib/python{{ pyver.stdout.split()[1] | regex_search('([0-9]+\\.[0-9]+)') }}/EXTERNALLY-MANAGED"
|
||||
when: pyver.stdout | regex_search('3\.[0-9]+')
|
||||
|
|
Loading…
Reference in a new issue