hcp-ansible/playbooks/tasks/haproxy/haproxy_deploy.yml
Bertrand Lanson 95a1d80f76
All checks were successful
development / Check commit compliance (push) Successful in 26s
feat: add nomad deployment options, variables, and playbooks
2024-06-25 15:16:42 +02:00

26 lines
848 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: "Register haproxy services in consul"
community.general.consul:
token: "{{ _credentials.consul.root_token.secret_id }}"
host: "127.0.0.1"
scheme: "{{ consul_api_scheme }}"
port: "{{ consul_api_port[consul_api_scheme] }}"
validate_certs: false
service_name: haproxy
service_port: 80
interval: 20s
http: http://localhost:9000/health