Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Ubuntu 24.04 in HAProxy role #315

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/haproxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
image:
- "ghcr.io/hifis-net/ubuntu-systemd:20.04"
- "ghcr.io/hifis-net/ubuntu-systemd:22.04"
- "ghcr.io/hifis-net/ubuntu-systemd:24.04"
- "ghcr.io/hifis-net/debian-systemd:10"
- "ghcr.io/hifis-net/debian-systemd:11"
- "ghcr.io/hifis-net/debian-systemd:12"
Expand Down
6 changes: 3 additions & 3 deletions molecule/haproxy/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ driver:
name: "podman"
platforms:
- name: "haproxy_v2.8"
image: "${MOLECULE_IMAGE:-ghcr.io/hifis-net/ubuntu-systemd:22.04}"
image: "${MOLECULE_IMAGE:-ghcr.io/hifis-net/ubuntu-systemd:24.04}"
pre_build_image: true
privileged: true
override_command: false
systemd: true
tty: true
- name: "haproxy_v2.6"
image: "${MOLECULE_IMAGE:-ghcr.io/hifis-net/ubuntu-systemd:22.04}"
image: "${MOLECULE_IMAGE:-ghcr.io/hifis-net/ubuntu-systemd:24.04}"
pre_build_image: true
privileged: true
override_command: false
systemd: true
tty: true
- name: "haproxy_v2.4"
image: "${MOLECULE_IMAGE:-ghcr.io/hifis-net/ubuntu-systemd:22.04}"
image: "${MOLECULE_IMAGE:-ghcr.io/hifis-net/ubuntu-systemd:24.04}"
pre_build_image: true
privileged: true
override_command: false
Expand Down
5 changes: 5 additions & 0 deletions molecule/haproxy/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
ansible_facts.distribution_release | lower == 'bookworm' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.4', '==') or
ansible_facts.distribution_release | lower == 'buster' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.8', '==')

- name: "Stop play for unsupported HAProxy / Ubuntu combinations"
ansible.builtin.meta: "end_host"
when: >-
ansible_facts.distribution_release | lower == 'noble' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.9', '<')
Normo marked this conversation as resolved.
Show resolved Hide resolved

- name: "Populate service facts."
ansible.builtin.service_facts:
register: "services_state"
Expand Down
1 change: 1 addition & 0 deletions roles/haproxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and scalability context.

Currently [supported platforms](meta/main.yml) are:

- Ubuntu 24.04 LTS
- Ubuntu 22.04 LTS
- Ubuntu 20.04 LTS
- Debian 10 (Buster)
Expand Down
1 change: 1 addition & 0 deletions roles/haproxy/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ galaxy_info:
versions:
- "focal"
- "jammy"
- "noble"
- name: "Debian"
versions:
- "buster"
Expand Down
5 changes: 5 additions & 0 deletions roles/haproxy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
ansible_facts.distribution_release | lower == 'bookworm' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.4', '==') or
ansible_facts.distribution_release | lower == 'buster' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.8', '==')

- name: "Stop role for unsupported HAProxy / Ubuntu combinations"
ansible.builtin.meta: "end_host"
when: >-
ansible_facts.distribution_release | lower == 'noble' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.9', '<')
Normo marked this conversation as resolved.
Show resolved Hide resolved

- name: "Enable ip_forward."
become: true
ansible.posix.sysctl:
Expand Down