ansible-roles/haproxy/tasks/main.yml

37 lines
1002 B
YAML
Raw Normal View History

---
2018-08-09 17:48:03 +02:00
- import_tasks: haproxy-service.yml
- import_tasks: haproxy-letsencrypt-acme-sh.yml
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
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
when:
- haproxy_letsencrypt_managed
2018-08-09 17:48:03 +02:00
- import_tasks: haproxy-nagios.yml
when:
- nagios_enabled is defined
- nagios_enabled
- name: Ensure that haproxy is enabled and started
service: name=haproxy state=restarted 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
2018-09-16 13:51:34 +02:00
- install_haproxy is 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