28 lines
657 B
YAML
28 lines
657 B
YAML
---
|
|
- 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
|