Skip to content

Commit 5d84b7c

Browse files
committed
Extend unsupported distro/version check for HAProxy >= 3.2
Added support checks to prevent role execution for HAProxy >= 3.2 on Debian Bullseye and non-Ubuntu Noble distributions. This avoids failure on unsupported combinations. Signed-off-by: Norman Ziegner <[email protected]>
1 parent 4828a27 commit 5d84b7c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

roles/haproxy/tasks/main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
ansible.builtin.meta: "end_host"
1919
when: >-
2020
ansible_facts.distribution_release | lower == 'bookworm' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.4', '==') or
21+
ansible_facts.distribution_release | lower == 'bullseye' and haproxy_version | regex_search('\\d+\\.\\d+') is version('3.2', '>=') or
2122
ansible_facts.distribution_release | lower == 'buster' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.8', '>=')
2223
2324
- name: "Stop role for unsupported HAProxy / Ubuntu combinations"
2425
ansible.builtin.meta: "end_host"
25-
when: "ansible_facts.distribution_release | lower == 'noble' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.9', '<')"
26+
when: >-
27+
ansible_facts.distribution_release | lower == 'noble' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.9', '<') or
28+
ansible_facts.distribution_release | lower != 'noble' and haproxy_version | regex_search('\\d+\\.\\d+') is version('3.2', '>=')
2629
2730
- name: "Enable ip_forward."
2831
become: true

0 commit comments

Comments
 (0)