2023-09-10 12:52:53 +02:00
|
|
|
[mysqld]
|
|
|
|
bind-address = "0.0.0.0"
|
2023-09-14 22:59:08 +02:00
|
|
|
{% if ansible_hostname == mysql.replication_master_hostname %}
|
2023-09-10 12:52:53 +02:00
|
|
|
server-id = 1
|
|
|
|
expire_logs_days = 10
|
|
|
|
max_binlog_size = 100M
|
|
|
|
log-bin = /var/log/mysql/mysql-bin.log
|
|
|
|
binlog_do_db = {{ wordpress.db_name }}
|
|
|
|
{% endif %}
|
|
|
|
{% for item in mysql.replication_slaves %}
|
|
|
|
{% if ansible_hostname == item %}
|
|
|
|
server-id = {{ loop.index0 + 2}}
|
|
|
|
relay-log = /var/log/mysql/mysql-relay-bin.log
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|