2024-04-01 21:59:48 +00:00
|
|
|
---
|
2024-03-17 09:57:02 +00:00
|
|
|
- name: "HAProxy"
|
|
|
|
block:
|
|
|
|
- name: "Include ednz_cloud.deploy_haproxy"
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
name: ednz_cloud.deploy_haproxy
|
|
|
|
|
|
|
|
- name: "Include ednz_cloud.deploy_keepalived"
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
name: ednz_cloud.deploy_keepalived
|
2024-03-22 00:00:04 +00:00
|
|
|
|
|
|
|
- name: "Register haproxy services in consul"
|
|
|
|
when: enable_consul | bool
|
|
|
|
block:
|
2024-04-01 21:59:48 +00:00
|
|
|
- name: "Load consul cluster variables"
|
|
|
|
ansible.builtin.include_vars:
|
|
|
|
file: "{{ sub_configuration_directories.consul_servers }}/consul_config.yml"
|
|
|
|
name: _consul_cluster_config
|
|
|
|
|
2024-03-22 00:00:04 +00:00
|
|
|
- name: "Register haproxy services in consul"
|
|
|
|
community.general.consul:
|
|
|
|
token: "{{ _consul_cluster_config.root_token.secret_id }}"
|
|
|
|
service_name: haproxy
|
|
|
|
service_port: 80
|
|
|
|
interval: 20s
|
|
|
|
http: http://localhost:9000/health
|