mirror of
https://github.com/geerlingguy/ansible-role-pip.git
synced 2024-11-28 12:35:42 +01:00
move the external managed task into a subtask, update ci to run newer images
This commit is contained in:
parent
2aef145841
commit
088273d11b
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@ -44,8 +44,9 @@ jobs:
|
|||||||
- rockylinux8
|
- rockylinux8
|
||||||
- fedora34
|
- fedora34
|
||||||
- ubuntu2004
|
- ubuntu2004
|
||||||
- ubuntu1804
|
- ubuntu2204
|
||||||
- debian10
|
- debian11
|
||||||
|
- debian12
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the codebase.
|
- name: Check out the codebase.
|
||||||
|
11
tasks/debian12.yml
Normal file
11
tasks/debian12.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
- 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
|
@ -1,16 +1,9 @@
|
|||||||
---
|
---
|
||||||
# Remove EXTERNALLY-MANAGED file if we're on Debian12
|
- name: Remove externally managed from Debian 12
|
||||||
# Related issue: https://github.com/geerlingguy/ansible-role-pip/issues/57
|
ansible.builtin.import_tasks: debian12.yml
|
||||||
- name: get python3 version installed
|
when:
|
||||||
ansible.builtin.command: python3 --version
|
- ansible_distribution == "Debian"
|
||||||
register: py3ver
|
- ansible_distribution_version == "12"
|
||||||
when: ansible_distribution == "Debian" and ansible_distribution_version == "12"
|
|
||||||
|
|
||||||
- name: remove EXTERNALLY-MANAGED if we're on debian12
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: /usr/lib/python3.11/EXTERNALLY-MANAGED
|
|
||||||
state: absent
|
|
||||||
when: py3ver is defined and py3ver.stdout.find("3.11") != -1
|
|
||||||
|
|
||||||
- name: Ensure Pip is installed.
|
- name: Ensure Pip is installed.
|
||||||
package:
|
package:
|
||||||
|
Loading…
Reference in New Issue
Block a user