Merge "Add a variable to allow extra raw config to be applied to all frontends"
This commit is contained in:
@@ -45,6 +45,10 @@ haproxy_stats_prometheus_enabled: False
|
||||
# defined for each service.
|
||||
haproxy_backup_nodes: []
|
||||
|
||||
# Configuration lines to write directly into all frontends
|
||||
haproxy_frontend_extra_raw: []
|
||||
haproxy_frontend_redirect_extra_raw: "{{ haproxy_frontend_extra_raw }}"
|
||||
|
||||
haproxy_service_configs: []
|
||||
# Example:
|
||||
# haproxy_service_configs:
|
||||
|
||||
@@ -39,6 +39,9 @@ bind {{ vip_address }}:{{ item.service.haproxy_redirect_http_port }}{{ (vip_inte
|
||||
acl {{ key }} {{ value.rule }}
|
||||
use_backend {{ value.backend_name | default(item.service.haproxy_service_name) }}-back if {{ key }}
|
||||
{% endfor %}
|
||||
{% for entry in haproxy_frontend_redirect_extra_raw %}
|
||||
{{ entry }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@@ -83,7 +86,7 @@ frontend {{ item.service.haproxy_service_name }}-front-{{ loop.index }}
|
||||
{% if not item.service.haproxy_frontend_only | default(false) %}
|
||||
default_backend {{ item.service.haproxy_service_name }}-back
|
||||
{% endif %}
|
||||
{% for entry in item.service.haproxy_frontend_raw|default([]) %}
|
||||
{% for entry in (item.service.haproxy_frontend_raw|default([])) + haproxy_frontend_extra_raw %}
|
||||
{{ entry }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user