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
|
2018-05-18 09:33:25 +02:00
|
|
|
state: present
|
2017-05-12 11:41:25 +02:00
|
|
|
tags:
|
|
|
|
- haproxy
|
2017-07-13 09:47:29 +02:00
|
|
|
- packages
|
|
|
|
|
2018-07-24 12:29:42 +02:00
|
|
|
- include: packages_backports.yml
|
|
|
|
when: haproxy_backports
|
2017-05-10 11:46:14 +02:00
|
|
|
|
|
|
|
- name: Install HAProxy package
|
2016-12-29 17:25:01 +01:00
|
|
|
apt:
|
|
|
|
name: haproxy
|
2018-05-18 09:33:25 +02:00
|
|
|
state: present
|
2017-05-12 11:41:25 +02:00
|
|
|
tags:
|
|
|
|
- haproxy
|
2017-07-13 09:47:29 +02:00
|
|
|
- packages
|
2017-05-10 11:46:14 +02:00
|
|
|
|
|
|
|
- name: Copy HAProxy configuration
|
|
|
|
template:
|
|
|
|
src: "{{ item }}"
|
|
|
|
dest: /etc/haproxy/haproxy.cfg
|
|
|
|
force: yes
|
2019-05-15 17:35:20 +02:00
|
|
|
validate: "haproxy -c -f %s"
|
2017-05-10 11:46:14 +02:00
|
|
|
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
|
2017-05-12 11:41:25 +02:00
|
|
|
tags:
|
|
|
|
- haproxy
|
2017-07-13 09:47:29 +02:00
|
|
|
- config
|
2017-09-19 09:36:59 +02:00
|
|
|
|
2018-02-13 16:35:55 +01:00
|
|
|
- include: munin.yml
|