Skip to content

Commit

Permalink
Stop role for usuported HAProxy version on Ubuntu 24.04
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Ziegner <[email protected]>
  • Loading branch information
Normo committed Sep 10, 2024
1 parent da96baa commit 7e67c23
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
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', '<')
- 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
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', '<')
- name: "Enable ip_forward."
become: true
ansible.posix.sysctl:
Expand Down

0 comments on commit 7e67c23

Please sign in to comment.