infrastructure/ansible/roles/ingress/tasks/haproxy.yml

21 lines
367 B
YAML

- name: Install Haproxy
package:
name: haproxy
become: true
- name: Haproxy config
template:
src: files/haproxy.cfg
dest: /etc/haproxy/haproxy.cfg
validate: /usr/sbin/haproxy -c -- %s
mode: "0644"
backup: yes
become: true
notify: restart haproxy
- name: Enable Haproxy
service:
name: haproxy
enabled: true
become: true