/etc/ansible/roles/haproxy_endpoints/defaults/main.yml
---
# Copyright 2017, Logan Vig <logan2211@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Can be used to completely disable the role's handler actions
haproxy_management: "{{ haproxy_hosts | default([]) | length > 0 }}"

# Selection of load balancer hosts to manage endpoints on
haproxy_group: haproxy
haproxy_hosts: "{{ groups[haproxy_group] }}"

haproxy_admin_socket: /var/run/haproxy.stat

# The endpoint name being managed
haproxy_endpoint_name: "{{ inventory_hostname }}"
# Backend name to set the server status on. By default the backend is
# "auto-detected" by ansible, which usually means all backends with this
# endpoint name will be managed.
# haproxy_backend:

# Toggle the endpoint active or disabled
haproxy_state: enabled

# Allow the endpoint to drain by default. Setting this to true will cause
# haproxy to immediately end all connected client sessions to the endpoint.
# This is necessary in cases where the server uses long-lived connections that
# do not cycle frequently.
haproxy_shutdown_sessions: no

# Block the management task until the endpoint reflects the intended status of
# MAINT or UP.
haproxy_wait: no
# haproxy_wait_interval: 5
# haproxy_wait_retries: 25

# haproxy_weight: 100%