Feat(domserver): add haproxy support

This commit is contained in:
2025-04-06 21:29:00 +08:00
parent 7f72c71f10
commit 43ee35f6a3
5 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
---
- name: Update package cache
community.general.pacman:
update_cache: true
- name: Install haproxy
community.general.pacman:
pkg:
- haproxy
notify: Upgrade packages
- name: Install haproxy.cfg
ansible.builtin.copy:
src: haproxy.cfg
dest: /etc/haproxy/haproxy.cfg
mode: '0644'
owner: haproxy
group: haproxy
notify: Restart haproxy
- name: Prompt for manually install cert
ansible.builtin.pause:
prompt: "Make sure the cert and key pair are store in /etc/haproxy/cert.pem"
- name: Enable and start haproxy
ansible.builtin.systemd_service:
name: haproxy.service
state: started
enabled: true