serlophug.haproxy
A dependable and high-performance load balancer for TCP and HTTP.
Role Variables
haproxy_user
: The user that runs HAProxy.haproxy_group
: The group of the user that runs HAProxy.haproxy_version
: The version of HAProxy to use. Valid options: 1.5, 1.6, 1.7, or 1.8.haproxy_config_dir
: The folder where configuration files are stored.haproxy_log_dir
: The folder where log files are kept.haproxy_run_dir
: The folder where the PID file is located.haproxy_global
(List<String>): Lines for the GLOBAL section in the configuration file.haproxy_defaults
(List<String>): Lines for the DEFAULTS section in the configuration file.haproxy_frontend_address
(String): The address for the frontend. Default is "*".haproxy_frontend_port
: The port for HAProxy's frontend. Default is 10000.haproxy_servers_balance
: The load balancing method for HAProxy. Default is roundrobin.haproxy_servers
(List<String>): Each entry is a backend server.haproxy_basic_auth_enabled
(Bool): Enables or disables basic authentication.haproxy_userlist
(List<Dict>): Each entry is a dictionary with three items:type
(String): Password type (insecure-password, password).user
(String): The username.password
(String): The password.
Example Playbook
- hosts: localhost
vars:
haproxy_group: haproxy
haproxy_user: haproxy
haproxy_version: 1.7
haproxy_global:
- "daemon"
- "maxconn 256"
- "user {{ haproxy_user }}"
- "group {{ haproxy_group }}"
haproxy_frontend_port: 80
haproxy_servers_balance: roundrobin
haproxy_servers:
- "s1 172.17.0.4:80"
- "s2 172.17.0.5:80"
roles:
- { role: serlophug.haproxy }
License
Apache 2.0
Installa
ansible-galaxy install serlophug.haproxy
Licenza
apache-2.0
Download
138
Proprietario
Ph.D in Computer Science. Universitat Politècnica de València.