diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 136501c..025e752 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,8 +44,9 @@ jobs: - rockylinux8 - fedora34 - ubuntu2004 - - ubuntu1804 - - debian10 + - ubuntu2204 + - debian11 + - debian12 steps: - name: Check out the codebase. diff --git a/tasks/debian12.yml b/tasks/debian12.yml new file mode 100644 index 0000000..1284a91 --- /dev/null +++ b/tasks/debian12.yml @@ -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 \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index 1761992..dcdbd13 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,16 +1,9 @@ --- -# 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 - 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: Remove externally managed from Debian 12 + ansible.builtin.import_tasks: debian12.yml + when: + - ansible_distribution == "Debian" + - ansible_distribution_version == "12" - name: Ensure Pip is installed. package: