2015-05-28 11:32:57 +02:00
|
|
|
---
|
2018-08-09 17:48:03 +02:00
|
|
|
- import_tasks: haproxy-service.yml
|
2018-08-20 19:18:27 +02:00
|
|
|
- import_tasks: haproxy-letsencrypt-acme-sh.yml
|
2016-04-16 18:48:54 +02:00
|
|
|
when:
|
|
|
|
- haproxy_letsencrypt_managed
|
2018-09-16 13:51:34 +02:00
|
|
|
- letsencrypt_acme_sh_install
|
2018-08-09 17:48:03 +02:00
|
|
|
- import_tasks: haproxy-letsencrypt-acmetool.yml
|
2016-04-16 18:48:54 +02:00
|
|
|
when:
|
|
|
|
- haproxy_letsencrypt_managed
|
2018-09-16 13:51:34 +02:00
|
|
|
- letsencrypt_acme_install
|
2018-08-09 17:48:03 +02:00
|
|
|
- import_tasks: haproxy-ssl.yml
|
2017-07-11 18:33:00 +02:00
|
|
|
when:
|
|
|
|
- haproxy_letsencrypt_managed
|
2016-07-05 12:45:01 +02:00
|
|
|
|
2018-08-09 17:48:03 +02:00
|
|
|
- import_tasks: haproxy-nagios.yml
|
2016-08-11 13:02:22 +02:00
|
|
|
when:
|
|
|
|
- nagios_enabled is defined
|
|
|
|
- nagios_enabled
|
|
|
|
|
2016-07-05 12:45:01 +02:00
|
|
|
- name: Ensure that haproxy is enabled and started
|
2018-08-20 19:18:27 +02:00
|
|
|
service: name=haproxy state=restarted enabled=yes
|
2016-07-05 12:45:01 +02:00
|
|
|
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
|
2018-09-16 13:51:34 +02:00
|
|
|
- install_haproxy is changed
|
2016-07-05 12:45:01 +02:00
|
|
|
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
|