Fix haproxy_stats SSL path defenition
Neither `vip_interface` nor `vip_address` are defined or available in the context they're being used. Thus we need to refer to available variables in order to render base config properly Current version fail with "AnsibleUndefinedVariable: 'vip_interface' is undefined" on "Drop base haproxy config" task. This fix the issue that was introduced with [1] and backported back to Zed [1] https://review.opendev.org/q/Ib8be6b7fc3dada9d20905b0f07d90ddce0335605 Change-Id: I4e52378d8c5b3eaa6863ecaf0d04554d082e3dc0
This commit is contained in:
parent
c321f39fc3
commit
2cc2fceaf6
|
@ -40,7 +40,7 @@ defaults
|
|||
timeout server {{ haproxy_server_timeout }}
|
||||
maxconn {{ haproxy_maxconn }}
|
||||
{% if haproxy_stats_enabled | bool %}
|
||||
{% set haproxy_ssl_path=haproxy_ssl_cert_path + "/haproxy_" + (haproxy_host | default(ansible_facts['hostname'])) + "-" + ((vip_interface is truthy) | ternary(vip_address ~ '-' ~ vip_interface, vip_address)) + ".pem" %}
|
||||
{% set haproxy_ssl_path = haproxy_ssl_cert_path + "/haproxy_" + (haproxy_host | default(ansible_facts['hostname'])) + "-" + ((haproxy_bind_internal_lb_vip_interface is truthy) | ternary(haproxy_bind_internal_lb_vip_address ~ '-' ~ haproxy_bind_internal_lb_vip_interface, haproxy_bind_internal_lb_vip_address)) + ".pem" %}
|
||||
listen stats
|
||||
bind {{ haproxy_stats_bind_address }}:{{ haproxy_stats_port }} {% if haproxy_stats_ssl | bool %}ssl crt {{ haproxy_stats_ssl_cert_path | default(haproxy_ssl_path) }} {% if haproxy_stats_ssl_client_cert_ca is defined %}verify required ca-file {{ haproxy_stats_ssl_client_cert_ca }}{% endif %}{% endif %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue