Feat(domserver): add haproxy support

This commit is contained in:
ytshih committed 2025-04-06 21:29:22 +08:00
1 parent 7f72c71f10
commit 43ee35f6a3
5 files changed
+94

No files matched your search

+27
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