Closed quartje closed 2 months ago
This allows you to for example to a location based loadbalancer failover. Suppose this is the backend server config:
in haproxy_applications, you have:
haproxy_applications: - name: engine ......... servers: "{{ docker_bluered_servers }}"
docker_bluered_servers: - { ip: "192.168.86.10", label: "DOCKER1RED", location: "amsterdam"} - { ip: "192.168.86.11", label: "DOCKER2BLUE", location: "utrecht"}
You can then do:
ansible-playbook -i inventory --tags haproxy_mgnt playbook_haproxy.yml -l loadbalancer -D \ -e weight=10 -e app_name=engine -e app_filter=location -e app_filtervalue=amsterdam
The weight in Amsterdam will be set to 10%, and in Utrecht to 90%
This allows you to for example to a location based loadbalancer failover. Suppose this is the backend server config:
in haproxy_applications, you have:
You can then do:
The weight in Amsterdam will be set to 10%, and in Utrecht to 90%