New in version 1.3.
Manages MySQL server replication, slave, master status get and change master host.
parameter | required | default | choices | comments |
---|---|---|---|---|
login_host | no | mysql host to connect | ||
login_password | no | password to connect mysql host, if defined login_user also needed. | ||
login_unix_socket | no | unix socket to connect mysql server | ||
login_user | no | username to connect mysql host, if defined login_password also needed. | ||
master_connect_retry | no | same as mysql variable | ||
master_host | no | same as mysql variable | ||
master_log_file | no | same as mysql variable | ||
master_log_pos | no | same as mysql variable | ||
master_password | no | same as mysql variable | ||
master_port | no | same as mysql variable | ||
master_ssl | no | same as mysql variable | ||
master_ssl_ca | no | same as mysql variable | ||
master_ssl_capath | no | same as mysql variable | ||
master_ssl_cert | no | same as mysql variable | ||
master_ssl_cipher | no | same as mysql variable | ||
master_ssl_key | no | same as mysql variable | ||
master_user | no | same as mysql variable | ||
mode | no | getslave |
|
module operating mode. Could be getslave (SHOW SLAVE STATUS), getmaster (SHOW MASTER STATUS), changemaster (CHANGE MASTER TO), startslave (START SLAVE), stopslave (STOP SLAVE) |
relay_log_file | no | same as mysql variable | ||
relay_log_pos | no | same as mysql variable |
# Stop mysql slave thread
- mysql_replication: mode=stopslave
# Get master binlog file name and binlog position
- mysql_replication: mode=getmaster
# Change master to master server 192.168.1.1 and use binary log 'mysql-bin.000009' with position 4578
- mysql_replication: mode=changemaster master_host=192.168.1.1 master_log_file=mysql-bin.000009 master_log_pos=4578