2015-05-28 11:32:57 +02:00
|
|
|
---
|
2016-04-13 19:52:10 +02:00
|
|
|
- include: haproxy-service.yml
|
|
|
|
- include: haproxy-letsencrypt.yml
|
2016-04-16 18:48:54 +02:00
|
|
|
when:
|
|
|
|
- haproxy_letsencrypt_managed
|
|
|
|
- letsencrypt_install is defined
|
|
|
|
- include: haproxy-letsencrypt-acmetool.yml
|
|
|
|
when:
|
|
|
|
- haproxy_letsencrypt_managed
|
|
|
|
- letsencrypt_acme_install is defined
|
2017-07-11 18:33:00 +02:00
|
|
|
- include: haproxy-ssl.yml
|
|
|
|
when:
|
|
|
|
- haproxy_letsencrypt_managed
|
2016-07-05 12:45:01 +02:00
|
|
|
|
2016-08-11 13:02:22 +02:00
|
|
|
- include: haproxy-nagios.yml
|
|
|
|
when:
|
|
|
|
- nagios_enabled is defined
|
|
|
|
- nagios_enabled
|
|
|
|
|
2016-07-05 12:45:01 +02:00
|
|
|
- name: Ensure that haproxy is enabled and started
|
|
|
|
service: name=haproxy state=started enabled=yes
|
|
|
|
when: haproxy_enabled
|
|
|
|
ignore_errors: True
|
|
|
|
tags: haproxy
|
|
|
|
|
|
|
|
- name: Haproxy puts a new rsyslog directive. Restart rsyslog to activate it. Reload is not sufficient
|
|
|
|
service: name=rsyslog state=restarted
|
|
|
|
when:
|
|
|
|
- haproxy_enabled
|
|
|
|
- ( install_haproxy | changed )
|
|
|
|
tags: haproxy
|
|
|
|
|
|
|
|
- name: Ensure that haproxy is stopped and disabled if needed
|
|
|
|
service: name=haproxy state=stopped enabled=no
|
|
|
|
when: not haproxy_enabled
|
|
|
|
tags: haproxy
|