ansible-roles/haproxy/tasks/main.yml

24 lines
530 B
YAML
Raw Normal View History

---
- name: ssl-cert package is installed
apt:
name: ssl-cert
state: installed
- name: Install HAProxy package
apt:
name: haproxy
state: installed
- name: Copy HAProxy configuration
template:
src: "{{ item }}"
dest: /etc/haproxy/haproxy.cfg
force: yes
with_first_found:
2017-05-10 14:30:53 +02:00
- "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