ansible-mysql/templates/etc/mysql/mariadb.conf.d/60-galera.cnf.j2

31 lines
921 B
Plaintext
Raw Normal View History

2024-08-26 21:48:03 +07:00
# -------------------------------------------
# {{ ansible_managed }}
# -------------------------------------------
#
# * Galera-related settings
#
# See the examples of server wsrep.cnf files in /usr/share/mariadb
# and read more at https://mariadb.com/kb/en/galera-cluster/
[galera]
# Global
wsrep_on = ON
2024-08-27 16:24:51 +07:00
wsrep_provider = /usr/lib/galera/libgalera_smm.so
2024-08-26 21:48:03 +07:00
wsrep_cluster_address = gcomm://{{ mariadb_galera_members | join(",") }}
wsrep_sst_method = "{{ mariadb_wsrep_sst_method }}"
{% if mariadb_wsrep_cluster_name is defined %}
wsrep_cluster_name = "{{ mariadb_wsrep_cluster_name }}"
{% endif %}
# Node Configuration
2024-08-27 16:24:51 +07:00
wsrep_node_address = "{{ mariadb_wsrep_node_address }}"
2024-08-26 21:48:03 +07:00
wsrep_node_name = "{{ mariadb_wsrep_node_name | default(ansible_fqdn) }}"
# Deps
binlog_format = ROW
default_storage_engine = InnoDB
innodb_autoinc_lock_mode = 2
innodb_doublewrite = 1