Fix `regen pem` with `extra_lb_tls_vip_addresses`

`extra_lb_tls_vip_addresses` is list of additional internal VIP
addresses, which gets parsed into `haproxy_tls_vip_binds` without
`interface` attribute.

Change-Id: I184021b65d6f3f28526c9fa09bea90a2baef77b2
This commit is contained in:
Danila Balagansky 2023-07-04 11:17:45 +03:00
parent c1be49a95c
commit 848e316ef5
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@
cat {{ item_base_path ~ '.crt' }} $(test -f {{ item_base_path ~ '-ca.crt' }} && echo {{ item_base_path ~ '-ca.crt' }}) {{ item_base_path ~ '.key' }} > {{ item_base_path ~ '.pem' }}
notify: Reload haproxy
vars:
item_interface: "{{ item['interface'] }}"
item_interface: "{{ item['interface'] | default('') }}"
item_name: "{{ ('interface' in item and item['interface'] is truthy) | ternary(item['address'] ~ '-' ~ item_interface, item['address']) }}"
item_base_path: "{{ haproxy_ssl_cert_path ~ '/haproxy_' ~ ansible_facts['hostname'] ~ '-' ~ item_name }}"
with_items: "{{ haproxy_tls_vip_binds }}"