Files
ansible-collection/roles/haproxy/tasks/main.yml
T

17 lines
454 B
YAML
Raw Normal View History

2026-10-02 21:34:01 +04:00
---
- name: install haproxy
ansible.builtin.apt:
name: haproxy
state: latest
update_cache: true
notify: restart haproxy
- name: deploy haproxy config
ansible.builtin.template:
src: "{{ inventory_hostname }}/haproxy.cfg.j2"
dest: "/etc/haproxy/haproxy.cfg"
owner: root
group: root
mode: "0644"
loop: "{{ query('fileglob', role_path + '/templates/' + inventory_hostname + '/*.cfg.j2') }}"
notify: restart haproxy