Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tersmitten committed Nov 30, 2021
1 parent b760f8e commit 4d152b4
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 24 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
warn_list:
- '106'
- ignore-errors
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ jobs:
fail-fast: false
matrix:
include:
- distro: ubuntu1604
ansible-version: '>=2.8, <2.9'
- distro: ubuntu1604
ansible-version: '>=2.9, <2.10'
- distro: ubuntu1604
Expand Down
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst
* `haproxy_listen.{n}.capture.name`: [required]: Name of the header or cookie to capture
* `haproxy_listen.{n}.capture.length`: [required]: Maximum number of characters to capture and report in the logs
* `haproxy_listen.{n}.filter`: [optional]: Content filters to apply to this section
* `haproxy_listen.{n}.filter.{n}.name`: [required]: The filter to apply
* `haproxy_listen.{n}.filter.{n}.params`: [optional]: Parameters for the filter
* `haproxy_listen.{n}.filter.{n}.name`: [required]: The name of the filter
* `haproxy_listen.{n}.filter.{n}.param`: [default: `[]`]: Parameters for the filter
* `haproxy_listen.{n}.http_request`: [optional]: Access control for Layer 7 requests
* `haproxy_listen.{n}.http_request.{n}.action`: [required]: The rules action (e.g. `add-header`)
* `haproxy_listen.{n}.http_request.{n}.param`: [optional]: The complete line to be added (e.g. `X-Forwarded-Proto https`)
Expand Down Expand Up @@ -230,8 +230,9 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst
* `haproxy_frontend.{n}.capture.type`: [required]: What to capture (`cookie`, `request header`, `response header`)
* `haproxy_frontend.{n}.capture.name`: [required]: Name of the header or cookie to capture
* `haproxy_frontend.{n}.capture.length`: [required]: Maximum number of characters to capture and report in the logs
* `haproxy_frontend.{n}.filter`: [optional]: Dictionary of content filters to apply to this section
* `haproxy_frontend.{n}.filter.{name}`: [required]: One or more filter `name: param` entries to apply
* `haproxy_frontend.{n}.filter`: [optional]: Content filters to apply to this section
* `haproxy_frontend.{n}.filter.{n}.name`: [required]: The name of the filter
* `haproxy_frontend.{n}.filter.{n}.param`: [default: `[]`]: Parameters for the filter
* `haproxy_frontend.{n}.http_request`: [optional]: Access control for Layer 7 requests
* `haproxy_frontend.{n}.http_request.{n}.action`: [required]: The rules action (e.g. `add-header`)
* `haproxy_frontend.{n}.http_request.{n}.param`: [optional]: The complete line to be added (e.g. `X-Forwarded-Proto https`)
Expand Down Expand Up @@ -355,8 +356,9 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst
* `haproxy_backend.{n}.rspirep.{n}.string`: [required]: The complete line to be added. Any space or known delimiter must be escaped using a backslash (`'\'`) (in version < 1.6)
* `haproxy_backend.{n}.rspirep.{n}.cond`: [optional]: Matching condition built from ACLs
* `haproxy_backend.{n}.cookie`: [optional]: Enable cookie-based persistence in a backend (e.g. `JSESSIONID prefix nocache`)
* `haproxy_backend.{n}.filter`: [optional]: Dictionary of content filters to apply to this section
* `haproxy_backend.{n}.filter.{name}`: [required]: One or more filter `name: param` entries to apply
* `haproxy_backend.{n}.filter`: [optional]: Content filters to apply to this section
* `haproxy_backend.{n}.filter.{n}.name`: [required]: The name of the filter
* `haproxy_backend.{n}.filter.{n}.param`: [default: `[]`]: Parameters for the filter
* `haproxy_backend.{n}.http_request`: [optional]: Access control for Layer 7 requests
* `haproxy_backend.{n}.http_request.{n}.action`: [required]: The rules action (e.g. `add-header`)
* `haproxy_backend.{n}.http_request.{n}.param`: [optional]: The complete line to be added (e.g. `X-Forwarded-Proto https`)
Expand Down Expand Up @@ -448,16 +450,16 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst
* `haproxy_letsencrypt_ocsp_deploy_job.weekday`: [default: `*`]: Day of the week that the job should run (e.g. `0-6` for Sunday-Saturday, `*`)

* `haproxy_cache`: [default: `[]`]: Caching declarations
* `haproxy_cache.{n}.name`: [default: [required]]: The name of the cache
* `haproxy_cache.{n}.total_max_size`: [default: []]: Max size (in MB) of the cache
* `haproxy_cache.{n}.max_object_size`: [default: []]: Max size (in MB) of any single object in the cache
* `haproxy_cache.{n}.max_age`: [default: []]: Max age (in seconds) to hold an item in cache
* `haproxy_cache.{n}.name`: [required]: The name of the cache
* `haproxy_cache.{n}.total_max_size`: [optional]: Max size (in MB) of the cache
* `haproxy_cache.{n}.max_object_size`: [optional]: Max size (in MB) of any single object in the cache
* `haproxy_cache.{n}.max_age`: [optional]: Max age (in seconds) to hold an item in cache

* `haproxy_program`: [default: `[]`]: Program declarations
* `haproxy_program.{n}.name`: [default: [required]]: The name of the program
* `haproxy_program.{n}.command`: [default: `[]`]: Command to execute
* `haproxy_program.{n}.name`: [required]: The name of the program
* `haproxy_program.{n}.command`: [optional]: Command to execute
* `haproxy_program.{n}.option`: [default: `[]`]: Options to enable
* `haproxy_program.{n}.no_option`: [default: `[]`]: Options to inverse/disable
* `haproxy_program.{n}.no_option`: [default: `[]`]: Options to inverse/disable

## Dependencies

Expand Down
2 changes: 1 addition & 1 deletion templates/etc/haproxy/backend.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ backend {{ backend.name }}
cookie {{ backend.cookie }}
{% endif %}
{% for filter in backend.filter | default([]) %}
filter {{ filter.name }}{{ filter.params is defined | ternary([''] + [filter.params], []) | join(' ') }}
filter {{ filter.name }}{% for param in filter.param | default([]) %} {{ param }}{% endfor %}
{% endfor %}
{% for acl in backend.acl | default([]) %}
acl {{ acl.string }}
Expand Down
4 changes: 1 addition & 3 deletions templates/etc/haproxy/cache.cfg.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% if cache is defined %}
{% for cache in haproxy_cache %}
{% for cache in haproxy_cache | default([]) %}
cache {{ cache.name }}
{% if cache.total_max_size is defined %}
total-max-size {{ cache.total_max_size }}
Expand All @@ -11,4 +10,3 @@ cache {{ cache.name }}
max-age {{ cache.max_age }}
{% endif %}
{% endfor %}
{% endif %}
2 changes: 1 addition & 1 deletion templates/etc/haproxy/frontend.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ frontend {{ frontend.name }}
timeout {{ timeout.type }} {{ timeout.timeout }}
{% endfor %}
{% for filter in frontend.filter | default([]) %}
filter {{ filter.name }}{{ filter.params is defined | ternary([''] + [filter.params], []) | join(' ') }}
filter {{ filter.name }}{% for param in filter.param | default([]) %} {{ param }}{% endfor %}
{% endfor %}
{% for acl in frontend.acl | default([]) %}
acl {{ acl.string }}
Expand Down
2 changes: 1 addition & 1 deletion templates/etc/haproxy/listen.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ listen {{ listen.name }}
timeout {{ timeout.type }} {{ timeout.timeout }}
{% endfor %}
{% for filter in listen.filter | default([]) %}
filter {{ filter.name }}{{ filter.params is defined | ternary([''] + [filter.params], []) | join(' ') }}
filter {{ filter.name }}{% for param in filter.param | default([]) %} {{ param }}{% endfor %}
{% endfor %}
{% for acl in listen.acl | default([]) %}
acl {{ acl.string }}
Expand Down
4 changes: 1 addition & 3 deletions templates/etc/haproxy/program.cfg.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% if haproxy_program is defined %}
{% for program in haproxy_program %}
{% for program in haproxy_program | default([]) %}
program {{ program.name }}
{% if program.command is defined %}
command {{ program.command }}
Expand All @@ -11,4 +10,3 @@ program {{ program.name }}
no option {{ option }}
{% endfor %}
{% endfor %}
{% endif %}

0 comments on commit 4d152b4

Please sign in to comment.