From 848e316ef5066cc0937ec9a91e215382373ae243 Mon Sep 17 00:00:00 2001 From: Danila Balagansky Date: Tue, 4 Jul 2023 11:17:45 +0300 Subject: [PATCH] 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 --- handlers/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/main.yml b/handlers/main.yml index bffe3e9..8418f7b 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -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 }}"