Skip to content

Commit

Permalink
Merge pull request #295 from staticdev/bugfix/remove-focal-in-favor-t…
Browse files Browse the repository at this point in the history
…o-bookworm

Remove Ubuntu focal support
  • Loading branch information
staticdev authored Jan 9, 2024
2 parents 12247f0 + 60f3dc7 commit 027ceb6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:
- debian12
- debian11
- ubuntu2204
- ubuntu2004

steps:
- name: Check out the repository
Expand Down
1 change: 0 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ galaxy_info:
- name: Ubuntu
versions:
- jammy
- focal

galaxy_tags:
- python
Expand Down
4 changes: 3 additions & 1 deletion tasks/custom_facts.yml
Original file line number Diff line number Diff line change
@@ -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' }}"
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 027ceb6

Please sign in to comment.