mirror of
https://github.com/HanXHX/ansible-mysql.git
synced 2026-02-24 10:13:30 +07:00
Replication OK (transfert from another git repo)
This commit is contained in:
15
templates/etc/mysql/conf.d/50-master.cnf.j2
Normal file
15
templates/etc/mysql/conf.d/50-master.cnf.j2
Normal file
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# {{ ansible_managed }}
|
||||
#
|
||||
|
||||
#
|
||||
# Replication master
|
||||
|
||||
[mysqld]
|
||||
server_id={{ mysql_server_id }}
|
||||
log-bin
|
||||
|
||||
# MariaDB only?
|
||||
#gtid_domain_id=1
|
||||
|
||||
; vim: set ft=dosini :
|
||||
26
templates/etc/mysql/conf.d/51-slave.cnf.j2
Normal file
26
templates/etc/mysql/conf.d/51-slave.cnf.j2
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# {{ ansible_managed }}
|
||||
#
|
||||
|
||||
#
|
||||
# Replication slave
|
||||
|
||||
[mysqld]
|
||||
server_id={{ mysql_server_id }}
|
||||
{% if mysql_slave_readonly %}
|
||||
read-only
|
||||
{% endif %}
|
||||
|
||||
# --> Ignore DB/tables
|
||||
{% if not mysql_slave_replicate_mysqldb %}
|
||||
replicate-ignore-db=mysql
|
||||
{% endif %}
|
||||
{% for db in mysql_slave_ignore_db %}
|
||||
replicate-ignore-db={{ db }}
|
||||
{% endfor %}
|
||||
{% for t in mysql_slave_ignore_table %}
|
||||
replicate-ignore-table={{ t }}
|
||||
{% endfor %}
|
||||
# <-- Ignore DB/tables
|
||||
|
||||
; vim: set ft=dosini :
|
||||
@@ -12,16 +12,17 @@ bind-address = {{ mysql_bind_address }}
|
||||
datadir = {{ mysql_datadir }}
|
||||
socket = {{ mysql_socket }}
|
||||
|
||||
# TODO: FIX later
|
||||
# Logging configuration.
|
||||
{% if mysql_log_error == 'syslog' or mysql_log == 'syslog' %}
|
||||
syslog
|
||||
syslog-tag = {{ mysql_syslog_tag }}
|
||||
{% else %}
|
||||
{% if mysql_log %}
|
||||
log = {{ mysql_log }}
|
||||
{% endif %}
|
||||
log-error = {{ mysql_log_error }}
|
||||
{% endif %}
|
||||
#{% if mysql_log_error == 'syslog' or mysql_log == 'syslog' %}
|
||||
#syslog
|
||||
#syslog-tag = {{ mysql_syslog_tag }}
|
||||
#{% else %}
|
||||
#{% if mysql_log %}
|
||||
#log = {{ mysql_log }}
|
||||
#{% endif %}
|
||||
#log-error = {{ mysql_log_error }}
|
||||
#{% endif %}
|
||||
|
||||
{% if mysql_slow_query_log_enabled %}
|
||||
# Slow query log configuration.
|
||||
@@ -63,8 +64,9 @@ thread_concurrency = {{ mysql_thread_concurrency }}
|
||||
innodb_file_per_table = {{ mysql_innodb_file_per_table }}
|
||||
innodb_buffer_pool_size = {{ mysql_innodb_buffer_pool_size }}
|
||||
innodb_additional_mem_pool_size = {{ mysql_innodb_additional_mem_pool_size }}
|
||||
innodb_log_file_size = {{ mysql_innodb_log_file_size }}
|
||||
innodb_log_buffer_size = {{ mysql_innodb_log_buffer_size }}
|
||||
# It craches after install (mysql 5.5)... TODO FIX -> http://dev.mysql.com/doc/refman/5.6/en/innodb-data-log-reconfiguration.html
|
||||
#innodb_log_file_size = {{ mysql_innodb_log_file_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 }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user