Skip to content

Commit 7027c5c

Browse files
authored
Merge pull request #433 from Normo/haproxy-3.2
Install HAProxy 3.2 by default
2 parents 527b9dd + bae4511 commit 7027c5c

File tree

5 files changed

+23
-6
lines changed

5 files changed

+23
-6
lines changed

molecule/haproxy/molecule.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ dependency:
99
driver:
1010
name: "podman"
1111
platforms:
12+
- name: "haproxy_v3.2"
13+
image: "${MOLECULE_IMAGE:-ghcr.io/hifis-net/ubuntu-systemd:24.04}"
14+
pre_build_image: true
15+
privileged: true
16+
override_command: false
17+
systemd: true
18+
tty: true
1219
- name: "haproxy_v3.0"
1320
image: "${MOLECULE_IMAGE:-ghcr.io/hifis-net/ubuntu-systemd:24.04}"
1421
pre_build_image: true
@@ -45,6 +52,10 @@ provisioner:
4552
vars:
4653
haproxy_ssl_dhparam_size: 512
4754
host_vars:
55+
haproxy_v3.2:
56+
haproxy_create_self_signed_cert: true
57+
haproxy_ppa_version: "ppa:vbernat/haproxy-3.2"
58+
haproxy_version: "3.2.*"
4859
haproxy_v3.0:
4960
haproxy_create_self_signed_cert: true
5061
haproxy_ppa_version: "ppa:vbernat/haproxy-3.0"

molecule/haproxy/verify.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@
1111
ansible.builtin.meta: "end_host"
1212
when: >-
1313
ansible_facts.distribution_release | lower == 'bookworm' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.4', '==') or
14+
ansible_facts.distribution_release | lower == 'bullseye' and haproxy_version | regex_search('\\d+\\.\\d+') is version('3.2', '>=') or
1415
ansible_facts.distribution_release | lower == 'buster' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.8', '>=')
1516
1617
- name: "Stop play for unsupported HAProxy / Ubuntu combinations"
1718
ansible.builtin.meta: "end_host"
18-
when: "ansible_facts.distribution_release | lower == 'noble' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.9', '<')"
19+
when: >-
20+
ansible_facts.distribution_release | lower == 'noble' and haproxy_version | regex_search('\\d+\\.\\d+') is version('2.9', '<') or
21+
ansible_facts.distribution_release | lower != 'noble' and haproxy_version | regex_search('\\d+\\.\\d+') is version('3.2', '>=')
1922
2023
- name: "Populate service facts."
2124
ansible.builtin.service_facts:

roles/haproxy/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,15 @@ haproxy_executable_path: '/usr/sbin/haproxy'
121121
Variable to pin the PPA version to a certain value:
122122
123123
```yaml
124-
haproxy_ppa_version: 'ppa:vbernat/haproxy-3.0'
124+
haproxy_ppa_version: 'ppa:vbernat/haproxy-3.2'
125125
```
126126
127127
#### HAProxy version
128128
129129
Variable to pin the HAProxy version to a certain value:
130130
131131
```yaml
132-
haproxy_version: '3.0.*'
132+
haproxy_version: '3.2.*'
133133
```
134134
135135
#### HAProxy user

roles/haproxy/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
# Path to the executable of HAProxy
88
haproxy_executable_path: "/usr/sbin/haproxy"
99
# HAProxy PPA version
10-
haproxy_ppa_version: "ppa:vbernat/haproxy-3.0"
10+
haproxy_ppa_version: "ppa:vbernat/haproxy-3.2"
1111
# HAProxy version
12-
haproxy_version: "3.0.*"
12+
haproxy_version: "3.2.*"
1313
# HAProxy user
1414
haproxy_user: "haproxy"
1515
# HAProxy group

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)