ansible-roles/haproxy/tasks/main.yml

38 lines
738 B
YAML

---
- name: ssl-cert package is installed
apt:
name: ssl-cert
state: present
tags:
- haproxy
- packages
- include: packages_backports.yml
when: haproxy_backports
- name: Install HAProxy package
apt:
name: haproxy
state: present
tags:
- haproxy
- packages
- name: Copy HAProxy configuration
template:
src: "{{ item }}"
dest: /etc/haproxy/haproxy.cfg
force: yes
validate: "haproxy -c -f %s"
with_first_found:
- "templates/haproxy/haproxy.{{ inventory_hostname }}.cfg.j2"
- "templates/haproxy/haproxy.{{ host_group }}.cfg.j2"
- "templates/haproxy/haproxy.default.cfg.j2"
- "haproxy.default.cfg.j2"
notify: reload haproxy
tags:
- haproxy
- config
- include: munin.yml