2016-12-29 17:25:01 +01:00
|
|
|
---
|
2017-05-10 11:46:14 +02:00
|
|
|
|
|
|
|
- name: ssl-cert package is installed
|
|
|
|
apt:
|
|
|
|
name: ssl-cert
|
|
|
|
state: installed
|
|
|
|
|
|
|
|
- name: Install HAProxy package
|
2016-12-29 17:25:01 +01:00
|
|
|
apt:
|
|
|
|
name: haproxy
|
2017-05-10 14:32:50 +02:00
|
|
|
state: installed
|
2017-05-10 11:46:14 +02:00
|
|
|
|
|
|
|
- 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"
|
2017-05-10 11:46:14 +02:00
|
|
|
notify: reload haproxy
|