Installs and configures HAProxy 1.5.
Support for HAProxy >=1.8 will be done at a later date.
The current release is 1.3.0.
The next release is in development (Cf. the projects tab).
- Supports CentOS and Debian (Ubuntu should work)
- Installs HAProxy from official repositories on Debian.
- Installs HAProxy from EPEL repository on CentOS.
- Tests via Molecule and Docker
- 
haproxy_globalGlobal HAProxy settings. 
- 
haproxy_defaultsDefault settings for frontends, backends, and listen proxies. 
- 
haproxy_resolversA list of HAProxy resolvers. 
- 
haproxy_backendsA list of HAProxy backends. 
- 
haproxy_frontendsA list of HAProxy frontends. 
- 
haproxy_listenA list of listen proxies. 
See vars/main.yml for a complete list of configurable .
See the wiki for more details.
- hosts: loadbalancers
  roles:
     - role: haproxy
       haproxy_frontends:
       - name: 'fe-mysupersite'
         ip: '123.123.123.120'
         port: '80'
         maxconn: '1000'
         default_backend: 'be-mysupersite'
       haproxy_backends:
       - name: 'be-mysupersite'
         description: 'mysupersite is really cool'
         servers:
           - name: 'be-mysupersite-01'
             ip: '192.168.1.100'To test the role you first need to install Molecule with :
$ pip install molecule docker
If you encounter a problem while installing with pip, install python-dev
To run the tests, execute :
$ molecule test
Apache v2
This role was created in 2014 by Pheromone - Pierre Paul Lefebvre ([email protected]).
This role was forked in 2019 by Deveryware.