add haproxy repo, custom config files & readme

This commit is contained in:
Ludovic Cartier
2025-09-23 14:59:37 +02:00
parent 58ef95e654
commit 141ec62e2c
8 changed files with 123 additions and 18 deletions

View File

@@ -22,7 +22,19 @@
notify:
- haproxy restart
- name: haproxy | copy configuration file
- name: haproxy | copy custom configuration file
copy:
src: "{{ haproxy_custom_configuration_file }}"
dest: '/etc/haproxy/haproxy.cfg'
owner: root
group: root
mode: '0440'
validate: 'haproxy -f %s -c {% if haproxy_accept_warnings %}-q{% endif %}'
when: haproxy_custom_configuration_file is defined
notify:
- haproxy reload
- name: haproxy | copy default configuration file
template:
src: haproxy.cfg.j2
dest: '/etc/haproxy/haproxy.cfg'
@@ -30,5 +42,6 @@
group: root
mode: '0440'
validate: 'haproxy -f %s -c {% if haproxy_accept_warnings %}-q{% endif %}'
when: haproxy_custom_configuration_file is not defined
notify:
- haproxy reload