27 lines
899 B
YAML
27 lines
899 B
YAML
---
|
|
- 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
|
|
|
|
- name: "Register haproxy services in consul"
|
|
when: enable_consul | bool
|
|
block:
|
|
- name: "Load consul cluster variables"
|
|
ansible.builtin.include_vars:
|
|
file: "{{ sub_configuration_directories.consul_servers }}/consul_config.yml"
|
|
name: _consul_cluster_config
|
|
|
|
- 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
|