761 B
761 B
ansible-role-haproxy
Ansible role to install and configure HAProxy load balancer
Installation
In your Ansible repo's requirements.txt file, you can include it as detailed below and install it via ansible-galaxy.
roles:
- src: ascendings.haproxy
version: 0.1.0 # change this as needed
vars
This section lists the available vars to configure this role.
haproxy_backend_servers - A hash of servers to use in the backend; example:
haproxy_backend_servers:
- name: web01
address: 192.168.1.10
port: 80 # optional; default is 80
- name: web02
address: 192.168.1.11
port: 80
haproxy_backend_balance - Defines the backend load-balancing method; refer to the HAProxy docs for valid options.