29 lines
535 B
YAML
29 lines
535 B
YAML
---
|
|
- name: ensure haproxy exists
|
|
apt:
|
|
name: haproxy
|
|
state: present
|
|
|
|
- name: ensure haproxy certs dir exists
|
|
file:
|
|
path: /etc/haproxy/certs
|
|
state: directory
|
|
owner: haproxy
|
|
group: haproxy
|
|
mode: 0750
|
|
|
|
- name: template haproxy config
|
|
template:
|
|
src: templates/haproxy.cfg.j2
|
|
dest: /etc/haproxy/haproxy.cfg
|
|
owner: haproxy
|
|
group: haproxy
|
|
mode: 0644
|
|
notify: reload haproxy
|
|
|
|
- name: ensure haproxy is started and enabled
|
|
systemd:
|
|
name: haproxy
|
|
state: started
|
|
enabled: True
|