mariadb: Disable wsrep-notify script if clustercheck enabled

Change-Id: Id16ec7d7b57630ae20430675c4a196e63ca8d4a5
This commit is contained in:
Michał Nasiadka
2021-04-14 11:05:59 +02:00
committed by Michal Nasiadka
parent 09fcfe8cd2
commit d7a9be84d4
3 changed files with 5 additions and 2 deletions

View File

@@ -91,6 +91,7 @@
when: when:
- inventory_hostname in groups[item.value.group] - inventory_hostname in groups[item.value.group]
- item.value.enabled | bool - item.value.enabled | bool
- not enable_mariadb_clustercheck | bool
with_dict: "{{ mariadb_services }}" with_dict: "{{ mariadb_services }}"
notify: notify:
- restart mariadb - restart mariadb

View File

@@ -40,7 +40,9 @@ wsrep_node_name={{ ansible_hostname }}
wsrep_sst_method={{ sst_method }} wsrep_sst_method={{ sst_method }}
wsrep_sst_auth={{ database_user }}:{{ database_password }} wsrep_sst_auth={{ database_user }}:{{ database_password }}
wsrep_slave_threads=4 wsrep_slave_threads=4
{% if not enable_mariadb_clustercheck | bool %}
wsrep_notify_cmd=/usr/local/bin/wsrep-notify.sh wsrep_notify_cmd=/usr/local/bin/wsrep-notify.sh
{% endif %}
wsrep_on = ON wsrep_on = ON
max_connections=10000 max_connections=10000

View File

@@ -7,13 +7,13 @@
"dest": "/etc/{{ mysql_dir }}/my.cnf", "dest": "/etc/{{ mysql_dir }}/my.cnf",
"owner": "mysql", "owner": "mysql",
"perm": "0600" "perm": "0600"
}, }{% if not enable_mariadb_clustercheck | bool %},
{ {
"source": "{{ container_config_directory }}/wsrep-notify.sh", "source": "{{ container_config_directory }}/wsrep-notify.sh",
"dest": "/usr/local/bin/wsrep-notify.sh", "dest": "/usr/local/bin/wsrep-notify.sh",
"owner": "mysql", "owner": "mysql",
"perm": "0700" "perm": "0700"
} }{% endif %}
], ],
"permissions": [ "permissions": [
{ {