Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tersmitten committed Aug 10, 2017
1 parent d7cc234 commit 74772ab
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst
* `haproxy_global_tune`: [default: `[]`]: (Performance) tuning declarations
* `haproxy_global_tune.{n}.key`: [required]: Setting name (e.g. `ssl.cachesize`)
* `haproxy_global_tune.{n}.value`: [required]: Setting value (e.g. `50000`)
* `haproxy_global_option: [default: `[]`]: Options (global)
* `haproxy_global_option: [default: `[]`]: Options (e.g. ['lua-load /etc/haproxy/acme-http01-webroot.lua', 'ssl-dh-param-file /etc/haproxy/dhparams.pem'])
* `haproxy_global_peers`: Peer list declarations
* `haproxy_global_peers.{n}.name`: Peer list name (e.g. `mypeers`)
* `haproxy_global_peers.{n}.peers`: Peer declarations
* `haproxy_global_peers.{n}.peers.{n}.name`: [required]: Name of the host (recommended to be `hostname`) (e.g. `haproxy1`)
* `haproxy_global_peers.{n}.peers.{n}.listen`: [required]: IP and port for peer to listen/connect to (e.g. `192.168.0.1:1024`)

* `haproxy_defaults_log`: [default: `global`]: Enable per-instance logging of events and traffic. `global` should be used when the instance's logging parameters are the same as the global ones. This is the most common usage
* `haproxy_defaults_mode`: [default: `http`]: Set the running mode or protocol of the instance
Expand Down Expand Up @@ -118,9 +123,6 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst
* `haproxy_listen.{n}.rsprep.{n}.string`: [required]: Regexp definition to be used on response
* `haproxy_listen.{n}.rsprep.{n}.cond`: [optional]: A condition to apply this rule

* `haproxy_peers.name`: Peersect name (e.g. `cluster1`)
* `haproxy_peers.{n}.name`: [required]: Name of the host (recommended to be hostname)
* `haproxy_peers.{n}.peer`: [required]: IP and port for peer to listen/connect to (e.g. `10.0.0.1:1024`)
* `haproxy_frontend`: [default: `[]`]: Front-end declarations
* `haproxy_frontend.{n}.name`: [required]: The name of the section (e.g. `https`)
* `haproxy_frontend.{n}.description`: [optional]: A description of the section (e.g. `Front-end for all HTTPS traffic`)
Expand Down
11 changes: 8 additions & 3 deletions templates/etc/haproxy/global.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,13 @@
tune.{{ tune.key }} {{ tune.value }}
{% endfor %}

{% if haproxy_global_option != false %}
{% for option in haproxy_global_option %}
{% for option in haproxy_global_option | default([]) %}
{{ option }}
{% endfor %}
{% endif %}

{% for peers in haproxy_global_peers | default([]) %}
peers {{ peers.name }}
{% for peer in peers.peers | default([]) %}
peer {{ peer.name }} {{ peer.listen }}
{% endfor %}
{% endfor %}
2 changes: 0 additions & 2 deletions templates/etc/haproxy/haproxy.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
global
{% include 'global.cfg.j2' %}

{% include 'peers.cfg.j2' %}

defaults
{% include 'defaults.cfg.j2' %}

Expand Down
6 changes: 0 additions & 6 deletions templates/etc/haproxy/peers.cfg.j2

This file was deleted.

0 comments on commit 74772ab

Please sign in to comment.