mirror of
https://github.com/HanXHX/ansible-mysql.git
synced 2026-02-24 10:13:30 +07:00
Rename mysql_ -> mariadb_
This commit is contained in:
@@ -11,14 +11,14 @@
|
||||
# Global
|
||||
wsrep_on=ON
|
||||
wsrep_provider=/usr/lib/galera/libgalera_smm.so
|
||||
wsrep_cluster_address=gcomm://{{ mysql_galera_members | join(",") }}
|
||||
wsrep_cluster_address=gcomm://{{ mariadb_galera_members | join(",") }}
|
||||
# TODO: https://mariadb.com/kb/en/mariadb/galera-cluster-system-variables/#wsrep_sst_method
|
||||
wsrep_sst_method=rsync
|
||||
# TODO: wsrep_cluster_name="my_wsrep_cluster"
|
||||
|
||||
# Node Configuration
|
||||
wsrep_node_address="{{ mysql_wsrep_node_address | default(ansible_default_ipv4.address) }}"
|
||||
wsrep_node_name="{{ mysql_wsrep_node_name | default(ansible_fqdn) }}"
|
||||
wsrep_node_address="{{ mariadb_wsrep_node_address | default(ansible_default_ipv4.address) }}"
|
||||
wsrep_node_name="{{ mariadb_wsrep_node_name | default(ansible_fqdn) }}"
|
||||
|
||||
|
||||
# --------------------
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# -------------------------------------------
|
||||
|
||||
[mysqld]
|
||||
{% for key, value in mysql_extra_configuration.items() %}
|
||||
{% for key, value in mariadb_extra_configuration.items() %}
|
||||
{% if value is defined or value is not none %}
|
||||
{{ key }} = {{ value }}
|
||||
{% else %}
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
# Replication master
|
||||
|
||||
[mysqld]
|
||||
server_id={{ mysql_server_id }}
|
||||
server_id={{ mariadb_server_id }}
|
||||
log_bin = mysql-bin
|
||||
log-bin-index = mysql-bin.index
|
||||
expire_logs_days = {{ mysql_expire_logs_days }}
|
||||
max_binlog_size = {{ mysql_max_binlog_size }}
|
||||
gtid_domain_id={{ mysql_gtid_domain_id }}
|
||||
expire_logs_days = {{ mariadb_expire_logs_days }}
|
||||
max_binlog_size = {{ mariadb_max_binlog_size }}
|
||||
gtid_domain_id={{ mariadb_gtid_domain_id }}
|
||||
|
||||
; vim: set ft=dosini :
|
||||
|
||||
@@ -6,19 +6,19 @@
|
||||
# Replication slave
|
||||
|
||||
[mysqld]
|
||||
server_id={{ mysql_server_id }}
|
||||
{% if mysql_slave_readonly %}
|
||||
server_id={{ mariadb_server_id }}
|
||||
{% if mariadb_slave_readonly %}
|
||||
read-only
|
||||
{% endif %}
|
||||
|
||||
# --> Ignore DB/tables
|
||||
{% if not mysql_slave_replicate_mysqldb %}
|
||||
{% if not mariadb_slave_replicate_mysqldb %}
|
||||
replicate-ignore-db=mysql
|
||||
{% endif %}
|
||||
{% for db in mysql_slave_ignore_db %}
|
||||
{% for db in mariadb_slave_ignore_db %}
|
||||
replicate-ignore-db={{ db }}
|
||||
{% endfor %}
|
||||
{% for t in mysql_slave_ignore_table %}
|
||||
{% for t in mariadb_slave_ignore_table %}
|
||||
replicate-ignore-table={{ t }}
|
||||
{% endfor %}
|
||||
# <-- Ignore DB/tables
|
||||
|
||||
@@ -3,29 +3,29 @@
|
||||
#
|
||||
|
||||
[client]
|
||||
port = {{ mysql_port }}
|
||||
socket = {{ mysql_socket }}
|
||||
port = {{ mariadb_port }}
|
||||
socket = {{ mariadb_socket }}
|
||||
|
||||
[mysqld]
|
||||
port = {{ mysql_port }}
|
||||
bind-address = {{ mysql_bind_address }}
|
||||
datadir = {{ mysql_datadir }}
|
||||
socket = {{ mysql_socket }}
|
||||
port = {{ mariadb_port }}
|
||||
bind-address = {{ mariadb_bind_address }}
|
||||
datadir = {{ mariadb_datadir }}
|
||||
socket = {{ mariadb_socket }}
|
||||
|
||||
{# TODO: FIX later #}
|
||||
# Logging configuration.
|
||||
{% if mysql_log_error == 'syslog' %}
|
||||
{% if mariadb_log_error == 'syslog' %}
|
||||
syslog
|
||||
syslog-tag = {{ mysql_syslog_tag }}
|
||||
syslog-tag = {{ mariadb_syslog_tag }}
|
||||
{% else %}
|
||||
log-error = {{ mysql_log_error }}
|
||||
log-error = {{ mariadb_log_error }}
|
||||
{% endif %}
|
||||
|
||||
{% if mysql_slow_query_log_enabled %}
|
||||
{% if mariadb_slow_query_log_enabled %}
|
||||
# Slow query log configuration.
|
||||
slow_query_log = 1
|
||||
slow_query_log_file = {{ mysql_slow_query_log_file }}
|
||||
long_query_time = {{ mysql_slow_query_time }}
|
||||
slow_query_log_file = {{ mariadb_slow_query_log_file }}
|
||||
long_query_time = {{ mariadb_slow_query_time }}
|
||||
{% endif %}
|
||||
|
||||
# Disabling symbolic-links is recommended to prevent assorted security risks
|
||||
@@ -38,39 +38,39 @@ user = mysql
|
||||
;performance_schema
|
||||
|
||||
# Memory settings.
|
||||
key_buffer_size = {{ mysql_key_buffer_size }}
|
||||
max_allowed_packet = {{ mysql_max_allowed_packet }}
|
||||
table_open_cache = {{ mysql_table_open_cache }}
|
||||
sort_buffer_size = {{ mysql_sort_buffer_size }}
|
||||
read_buffer_size = {{ mysql_read_buffer_size }}
|
||||
read_rnd_buffer_size = {{ mysql_read_rnd_buffer_size }}
|
||||
myisam_sort_buffer_size = {{ mysql_myisam_sort_buffer_size }}
|
||||
thread_cache_size = {{ mysql_thread_cache_size }}
|
||||
query_cache_size = {{ mysql_query_cache_size }}
|
||||
key_buffer_size = {{ mariadb_key_buffer_size }}
|
||||
max_allowed_packet = {{ mariadb_max_allowed_packet }}
|
||||
table_open_cache = {{ mariadb_table_open_cache }}
|
||||
sort_buffer_size = {{ mariadb_sort_buffer_size }}
|
||||
read_buffer_size = {{ mariadb_read_buffer_size }}
|
||||
read_rnd_buffer_size = {{ mariadb_read_rnd_buffer_size }}
|
||||
myisam_sort_buffer_size = {{ mariadb_myisam_sort_buffer_size }}
|
||||
thread_cache_size = {{ mariadb_thread_cache_size }}
|
||||
query_cache_size = {{ mariadb_query_cache_size }}
|
||||
|
||||
# Other settings.
|
||||
wait_timeout = {{ mysql_wait_timeout }}
|
||||
wait_timeout = {{ mariadb_wait_timeout }}
|
||||
|
||||
# Try number of CPU's * 2 for thread_concurrency.
|
||||
thread_concurrency = {{ mysql_thread_concurrency }}
|
||||
thread_concurrency = {{ mariadb_thread_concurrency }}
|
||||
|
||||
# InnoDB settings.
|
||||
innodb_file_per_table = {{ mysql_innodb_file_per_table }}
|
||||
innodb_buffer_pool_size = {{ mysql_innodb_buffer_pool_size }}
|
||||
innodb_log_buffer_size = {{ mysql_innodb_log_buffer_size }}
|
||||
innodb_flush_log_at_trx_commit = {{ mysql_innodb_flush_log_at_trx_commit }}
|
||||
innodb_lock_wait_timeout = {{ mysql_innodb_lock_wait_timeout }}
|
||||
innodb_file_per_table = {{ mariadb_innodb_file_per_table }}
|
||||
innodb_buffer_pool_size = {{ mariadb_innodb_buffer_pool_size }}
|
||||
innodb_log_buffer_size = {{ mariadb_innodb_log_buffer_size }}
|
||||
innodb_flush_log_at_trx_commit = {{ mariadb_innodb_flush_log_at_trx_commit }}
|
||||
innodb_lock_wait_timeout = {{ mariadb_innodb_lock_wait_timeout }}
|
||||
{# If this setting changes on a running system, you will break it! #}
|
||||
{# See how tho change it here: http://dev.mysql.com/doc/refman/5.6/en/innodb-data-log-reconfiguration.html #}
|
||||
{# TODO FIX -> Maybe detect a change and fail, just to be safe? #}
|
||||
innodb_log_file_size = {{ mysql_innodb_log_file_size }}
|
||||
innodb_log_file_size = {{ mariadb_innodb_log_file_size }}
|
||||
|
||||
[mysqldump]
|
||||
quick
|
||||
max_allowed_packet = {{ mysql_mysqldump_max_allowed_packet }}
|
||||
max_allowed_packet = {{ mariadb_mysqldump_max_allowed_packet }}
|
||||
|
||||
[mysqld_safe]
|
||||
pid-file = {{ mysql_pid_file }}
|
||||
pid-file = {{ mariadb_pid_file }}
|
||||
|
||||
#
|
||||
# * IMPORTANT: Additional settings that can override those from this file!
|
||||
|
||||
Reference in New Issue
Block a user