diff --git a/ansible/roles/mariadb/tasks/config.yml b/ansible/roles/mariadb/tasks/config.yml index 5e6238148d2ee02d49408702dddd808424812990..2e9ceb75f04d08258bc048323c545143dbd659f1 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 023f824b40fdb8c195b75629a4139c7cd46d8b5d..e1f53c098553a61e2f4a392b8af0a26f266f66e5 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 1b77f5e88f45d3cad1816acb0236cf19cb938816..e9003a0dfeb7622d6f71fe2235870a1eefdc0022 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": [ {