37 lines
1009 B
YAML
37 lines
1009 B
YAML
---
|
|
- import_tasks: haproxy-service.yml
|
|
- import_tasks: haproxy-letsencrypt.yml
|
|
when:
|
|
- haproxy_letsencrypt_managed
|
|
- letsencrypt_install is defined
|
|
- import_tasks: haproxy-letsencrypt-acmetool.yml
|
|
when:
|
|
- haproxy_letsencrypt_managed
|
|
- letsencrypt_acme_install is defined
|
|
- import_tasks: haproxy-ssl.yml
|
|
when:
|
|
- haproxy_letsencrypt_managed
|
|
|
|
- import_tasks: haproxy-nagios.yml
|
|
when:
|
|
- nagios_enabled is defined
|
|
- nagios_enabled
|
|
|
|
- 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
|