diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9c52344..0ae80fd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,7 +46,6 @@ jobs: - debian12 - debian11 - ubuntu2204 - - ubuntu2004 steps: - name: Check out the repository diff --git a/meta/main.yml b/meta/main.yml index 175d71c..1446198 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -17,7 +17,6 @@ galaxy_info: - name: Ubuntu versions: - jammy - - focal galaxy_tags: - python diff --git a/tasks/custom_facts.yml b/tasks/custom_facts.yml index dd52727..001c741 100644 --- a/tasks/custom_facts.yml +++ b/tasks/custom_facts.yml @@ -1,4 +1,6 @@ --- +# ansible incorrectly identified Debian bookworm as focal +# https://github.com/ansible/ansible/issues/79733 - name: Set command path based on distribution ansible.builtin.set_fact: - pipx_path: "{{ '/usr/bin' if ansible_distribution_release == 'bookworm' else ansible_env.HOME + '/.local/bin' }}" + pipx_path: "{{ '/usr/bin' if ansible_distribution_release == 'focal' or ansible_distribution_release == 'bookworm' else ansible_env.HOME + '/.local/bin' }}" diff --git a/tasks/main.yml b/tasks/main.yml index 3dc2248..ab0b8b1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -22,13 +22,13 @@ name: pipx state: present become: true - when: pipx_version_cmd is failed and ansible_distribution_release == 'bookworm' + when: pipx_version_cmd is failed and (ansible_distribution_release == 'focal' or ansible_distribution_release == 'bookworm') - name: Install pipx on non-Bookworm OS ansible.builtin.pip: name: pipx extra_args: --user - when: pipx_version_cmd is failed and ansible_distribution_release != 'bookworm' + when: pipx_version_cmd is failed and ansible_distribution_release != 'focal' and ansible_distribution_release != 'bookworm' - name: Check if pre-commit is installed ansible.builtin.command: "{{ ansible_env.HOME }}/.local/bin/pre-commit --version"