2017-05-10 11:46:14 +02:00
# haproxy
2016-12-29 17:25:01 +01:00
2017-05-10 11:46:14 +02:00
Install HAProxy.
2016-12-29 17:25:01 +01:00
2017-05-10 11:46:14 +02:00
## Tasks
2016-12-29 17:25:01 +01:00
2017-05-10 11:46:14 +02:00
Everything is in the `tasks/main.yml` file.
2016-12-29 17:25:01 +01:00
2017-05-10 11:46:14 +02:00
## Available variables
2016-12-29 17:25:01 +01:00
2017-05-10 14:32:50 +02:00
There is no variable.
2017-05-10 14:30:53 +02:00
## 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`