Feat(domserver): add haproxy support
This commit is contained in:
27
roles/configure_haproxy/tasks/main.yml
Normal file
27
roles/configure_haproxy/tasks/main.yml
Normal 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
|
||||
Reference in New Issue
Block a user