Installs HAProxy on RedHat/CentOS servers.
- On RedHat/CentOS 6 must enable EPEL repo to install the socat package.
-
haproxy_manage_config: true
-
haproxy_etc_prefix: /etc
-
haproxy_defaults
- see defaults/main.yml
-
haproxy_global
- see defaults/main.yml
-
haproxy_stats
- see defaults/main.yml
haproxy_config: "/etc/haproxy/haproxy.cfg"
None.
- hosts: servers
roles:
- role: haproxy
haproxy_frontends:
- name: 'fe-testsite'
ip: '{{ ansible_default_ipv4.address }}'
port: '80'
maxconn: '1000'
default_backend: 'be-testsite'
haproxy_backends:
- name: 'be-testsite'
description: 'testsite'
servers:
- name: 'be-testsite-01'
ip: '192.168.1.100'
z