ansible-roles/haproxy/tasks/main.yml
Jérémy Lecour 7fe89d2419
All checks were successful
continuous-integration/drone/push Build is passing
haproxy: add another variable for configuration
2019-10-11 21:24:32 +02:00

39 lines
801 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: "{{ haproxy_force_config }}"
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
when: "{{ haproxy_update_config }}"
tags:
- haproxy
- config
- include: munin.yml