ansible-roles/haproxy
2017-05-10 14:33:36 +02:00
..
defaults HAProxy: add templates lookup and documentation 2017-05-10 11:47:14 +02:00
handlers HAProxy: packages only 2016-12-29 17:25:01 +01:00
meta Ansible >= 2.2 supported 2017-03-24 14:15:09 +01:00
tasks haproxy: simplify template selection 2017-05-10 14:33:36 +02:00
templates haproxy: simplify template selection 2017-05-10 14:33:36 +02:00
README.md haproxy: simplify template selection 2017-05-10 14:33:36 +02:00

haproxy

Install HAProxy.

Tasks

Everything is in the tasks/main.yml file.

Available variables

  • general_package_release: which Debian release to use generally (default: stable).
  • haproxy_package_release: which Debian release to use for HAProxy (default: general_package_release).

The full list of variables (with default values) can be found in defaults/main.yml.

Configuration templates

The roles compiles a haproxy.cfg file based on templates that are looked up in that order :

  1. {{ playbook_dir}}/templates/haproxy/haproxy.{{ inventory_hostname}}.cfg.j2
  2. {{ playbook_dir}}/templates/haproxy/haproxy.{{ host_group}}.cfg.j2 (NB : host_group is not a core variable, it must be defined in group_vars files.)
  3. {{ playbook_dir}}/templates/haproxy/haproxy.default.cfg.j2

If nothing is found, the role falls back to the template embedded in the role : templates/haproxy.default.cfg.j2