ansible-roles/haproxy/tasks/main.yml

37 lines
769 B
YAML
Raw Normal View History

---
- name: ssl-cert package is installed
apt:
name: ssl-cert
state: installed
2017-05-12 11:41:25 +02:00
tags:
- haproxy
2017-07-13 09:47:29 +02:00
- packages
2017-08-29 00:00:59 +02:00
- include: packages_jessie_backports.yml
2017-07-13 09:47:29 +02:00
when: ansible_distribution_release == "jessie" and haproxy_jessie_backports
- name: Install HAProxy package
apt:
name: haproxy
state: installed
2017-05-12 11:41:25 +02:00
tags:
- haproxy
2017-07-13 09:47:29 +02:00
- packages
- 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
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
- include: nagios.yml