Skip to content

Ansible Galaxy Role for HAProxy. Installs and configure haproxy under ubuntu/debian/centos

License

Notifications You must be signed in to change notification settings

kefniark/ansible-haproxy-role

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-haproxy-role

Build Status

This Ansible Role install and configure haproxy.

Current OS supported :

  • CentOS 6
  • Debian wheezy
  • Ubuntu 14

This repository is based on a MIT License

Install

This project is available on Ansible Galaxy. To install :

  ansible-galaxy install kefniark.haproxy-role

Documentation:

To see all available options, you can look to the Documentation.

This project also contains two examples :

  • A reverse proxy for a pre installed web server : Exemple 1
  • A load balancer in front of web servers : Exemple 2

To make this Role more reusable, it contains 3 different tags :

  • haproxy_install : install haproxy on the host (apt/yum/...)
  • haproxy_configure : task which create the /etc/haproxy/haproxy.cfg
  • haproxy_service : tasks used to start/reload the service when there is a modification

Example Playbook

- hosts: all
  remote_user: root
  roles:
   - role: haproxy
     haproxy_frontends:
     - name: loadbalancer
       bind: '*:8080'
       default_backend: webserver
     haproxy_backends:
     - name: webserver
       servers:
        - name: backend1
          ip: localhost
          port: 80

More Informations

Author: Destrem Kevin

This project is still in development and lot options are missing or not supported. You can follow the development status on Trello.

About

Ansible Galaxy Role for HAProxy. Installs and configure haproxy under ubuntu/debian/centos

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published