Nicolas Simond 982885eb6c Merge pull request #1 from stylersnico/patch-1
Added missing Dependencies + update
2016-08-03 14:50:01 +02:00
2016-06-29 17:32:31 +02:00
2016-06-29 17:32:31 +02:00
2016-06-29 18:06:26 +02:00
2016-06-30 17:02:20 +02:00
2016-06-29 17:32:31 +02:00
2016-06-30 15:35:54 +02:00
2016-06-30 15:35:54 +02:00
2016-08-03 14:46:05 +02:00

HAProxy

Setup HAProxy

Requirements

  • Ansible 2.x
  • Make package on remote system

Role Variables

haproxy_frontends:
  http_front:
  - bind *:80
  - default_backend http_back
  custom_front:
  - bind *:8081
  - default_backend http_back
haproxy_backends:
  http_back:
  - balance roundrobin
  - server http1 127.0.0.1:8000 check
  - server http2 127.0.0.1:8001 check

Dependencies

You must installe make (apt-get install make -y) on remote host.

This is done by our example playbook.

Example Playbook

- hosts: haproxy
  tasks:
  - name: install make
    apt: name=make state=present

- hosts: haproxy
  vars:
    haproxy_frontends:
      http_front:
      - bind *:80
      - default_backend http_back
    haproxy_backends:
      http_back:
      - balance roundrobin
      - server http1 10.0.0.1:80 check
      - server http2 10.0.0.2:80 check

  roles:
  - role: SimpliField.haproxy

License

BSD

S
Description
Ansible role to setup HAProxy
Readme 36 KiB
Languages
Jinja 91.7%
Makefile 8.3%