36 lines
773 B
YAML
36 lines
773 B
YAML
---
|
|
- name: Wait for APT Lock
|
|
ansible.builtin.include_tasks: shared/tasks/wait_apt.yml
|
|
|
|
- name: Install haproxy
|
|
ansible.builtin.apt:
|
|
name:
|
|
- haproxy
|
|
install_recommends: false
|
|
|
|
- name: Directory /etc/sysconfig
|
|
ansible.builtin.file:
|
|
path: /etc/sysconfig
|
|
state: directory
|
|
mode: u=rwX,go=rX
|
|
|
|
- name: Haproxy service environment file
|
|
ansible.builtin.copy:
|
|
src: haproxy.env
|
|
dest: /etc/sysconfig/haproxy
|
|
mode: u=rwX,go=rX
|
|
notify: Restart haproxy
|
|
|
|
- name: Haproxy base config
|
|
ansible.builtin.template:
|
|
src: haproxy.cfg.j2
|
|
dest: /etc/haproxy/haproxy.cfg
|
|
mode: u=rw,g=r,o=
|
|
group: haproxy
|
|
notify: Restart haproxy
|
|
|
|
- name: Enable haproxy service
|
|
ansible.builtin.systemd:
|
|
name: haproxy.service
|
|
enabled: true
|