diff --git a/ansible/roles/mariadb/tasks/config.yml b/ansible/roles/mariadb/tasks/config.yml index 5e6238148d..2e9ceb75f0 100644 --- a/ansible/roles/mariadb/tasks/config.yml +++ b/ansible/roles/mariadb/tasks/config.yml @@ -91,6 +91,7 @@ when: - inventory_hostname in groups[item.value.group] - item.value.enabled | bool + - not enable_mariadb_clustercheck | bool with_dict: "{{ mariadb_services }}" notify: - restart mariadb diff --git a/ansible/roles/mariadb/templates/galera.cnf.j2 b/ansible/roles/mariadb/templates/galera.cnf.j2 index 023f824b40..e1f53c0985 100644 --- a/ansible/roles/mariadb/templates/galera.cnf.j2 +++ b/ansible/roles/mariadb/templates/galera.cnf.j2 @@ -40,7 +40,9 @@ wsrep_node_name={{ ansible_hostname }} wsrep_sst_method={{ sst_method }} wsrep_sst_auth={{ database_user }}:{{ database_password }} wsrep_slave_threads=4 +{% if not enable_mariadb_clustercheck | bool %} wsrep_notify_cmd=/usr/local/bin/wsrep-notify.sh +{% endif %} wsrep_on = ON max_connections=10000 diff --git a/ansible/roles/mariadb/templates/mariadb.json.j2 b/ansible/roles/mariadb/templates/mariadb.json.j2 index 1b77f5e88f..e9003a0dfe 100644 --- a/ansible/roles/mariadb/templates/mariadb.json.j2 +++ b/ansible/roles/mariadb/templates/mariadb.json.j2 @@ -7,13 +7,13 @@ "dest": "/etc/{{ mysql_dir }}/my.cnf", "owner": "mysql", "perm": "0600" - }, + }{% if not enable_mariadb_clustercheck | bool %}, { "source": "{{ container_config_directory }}/wsrep-notify.sh", "dest": "/usr/local/bin/wsrep-notify.sh", "owner": "mysql", "perm": "0700" - } + }{% endif %} ], "permissions": [ {