Update tasks name

This commit is contained in:
Socheat Sok 2024-05-15 15:49:56 +07:00
parent a2b57a6869
commit 46e70e9d0a
No known key found for this signature in database
GPG Key ID: 8967527396F3D1B5
1 changed files with 2 additions and 2 deletions

View File

@ -1,12 +1,12 @@
---
# Remove EXTERNALLY-MANAGED if pip_externally_managed is true and python3 version is 3.11 or higher.
# Related issue: https://github.com/geerlingguy/ansible-role-pip/issues/57
- name: Get python3 version installed
- name: Get installed python3 version
ansible.builtin.shell: python3 --version | awk '{split($2, a, "."); print a[1] "." a[2]}'
register: py3ver
changed_when: false
- name: Remove EXTERNALLY-MANAGED
- name: Ensure "{{ 'absent' if not pip_externally_managed else 'present' }}" of EXTERNALLY-MANAGED
ansible.builtin.file:
path: "/usr/lib/python{{ py3ver.stdout }}/EXTERNALLY-MANAGED"
state: "{{ 'absent' if not pip_externally_managed else 'touch' }}"