From dc9466da81507c72a79501f1e2022cd026a5a001 Mon Sep 17 00:00:00 2001 From: Joshua Hoffmann Date: Thu, 24 Oct 2024 12:19:04 +0200 Subject: [PATCH] Templating: Only use wsrep_provider_options when galera_extra_wsrep_provider_options is defined --- tasks/setup_cluster.yml | 2 +- templates/etc/mysql/conf.d/galera.cnf.j2 | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/setup_cluster.yml b/tasks/setup_cluster.yml index 3e4aa01..482e1a0 100644 --- a/tasks/setup_cluster.yml +++ b/tasks/setup_cluster.yml @@ -48,7 +48,7 @@ galera_extra_wsrep_provider_options: > {{ galera_extra_wsrep_provider_options | combine({ - 'ist.recv_addr': galera_ist_recv_addr + ":" + galera_ist_recv_addr_port, + 'ist.recv_addr': galera_ist_recv_addr + ":" + galera_ist_recv_addr_port|string, 'ist.recv_bind': galera_ist_recv_bind }) }} diff --git a/templates/etc/mysql/conf.d/galera.cnf.j2 b/templates/etc/mysql/conf.d/galera.cnf.j2 index fd83374..585286f 100644 --- a/templates/etc/mysql/conf.d/galera.cnf.j2 +++ b/templates/etc/mysql/conf.d/galera.cnf.j2 @@ -72,7 +72,9 @@ wsrep_notify_cmd='{{ galera_monitor_script_path }}/{{ galera_monitor_script_name wsrep_node_address="{{ galera_wsrep_node_address }}" +{% if galera_extra_wsrep_provider_options is defined %} wsrep_provider_options = "{% for item in galera_extra_wsrep_provider_options %}{% set _key = item.split(': ')[0] %}{% set _val = galera_extra_wsrep_provider_options[_key] %}{{ _key }} = {{ _val }}{% if not loop.last %}; {% endif %}{% endfor %}" +{% endif %} [sst] {% if mariadb_tls_files and mariadb_tls_files|length == 3 and galera_sst_tls_enabled %}