2016-09-23 16:40:35 +07:00
|
|
|
#
|
|
|
|
# {{ ansible_managed }}
|
|
|
|
#
|
|
|
|
|
|
|
|
[mysqld]
|
|
|
|
|
2016-09-23 22:03:13 +07:00
|
|
|
# --------------------
|
2016-09-23 16:40:35 +07:00
|
|
|
# Galera config
|
2016-09-23 22:03:13 +07:00
|
|
|
# --------------------
|
2016-09-23 16:40:35 +07:00
|
|
|
|
2016-09-23 22:03:13 +07:00
|
|
|
# Global
|
2016-09-23 16:40:35 +07:00
|
|
|
wsrep_on=ON
|
2016-09-23 22:03:13 +07:00
|
|
|
wsrep_provider=/usr/lib/galera/libgalera_smm.so
|
2018-03-17 23:28:54 +07:00
|
|
|
wsrep_cluster_address=gcomm://{{ mariadb_galera_members | join(",") }}
|
2018-07-14 16:33:43 +07:00
|
|
|
wsrep_sst_method="{{ mariadb_wsrep_stt_method }}"
|
|
|
|
{% if mariadb_wsrep_cluster_name is defined %}
|
|
|
|
wsrep_cluster_name="{{ mariadb_wsrep_cluster_name }}"
|
|
|
|
{% endif %}
|
2016-09-23 16:40:35 +07:00
|
|
|
|
2016-09-23 22:03:13 +07:00
|
|
|
# Node Configuration
|
2019-04-16 18:55:38 +07:00
|
|
|
wsrep_node_address="{{ mariadb_wsrep_node_address | default(ansible_default_ipv4.address if ansible_default_ipv4 is defined else '127.0.0.1') }}"
|
2018-03-17 23:28:54 +07:00
|
|
|
wsrep_node_name="{{ mariadb_wsrep_node_name | default(ansible_fqdn) }}"
|
2016-09-23 22:03:13 +07:00
|
|
|
|
|
|
|
|
|
|
|
# --------------------
|
2016-09-23 16:40:35 +07:00
|
|
|
# Deps
|
2016-09-23 22:03:13 +07:00
|
|
|
# --------------------
|
2016-09-23 16:40:35 +07:00
|
|
|
binlog_format=ROW
|
|
|
|
default_storage_engine=InnoDB
|
|
|
|
innodb_autoinc_lock_mode=2
|
|
|
|
innodb_doublewrite=1
|
2018-07-14 16:33:43 +07:00
|
|
|
{% if mariadb_version == '10.0'%}
|
2016-09-23 16:40:35 +07:00
|
|
|
query_cache_size=0
|
2018-07-14 16:33:43 +07:00
|
|
|
{% endif %}
|