mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Allow 0 to be specified
This commit is contained in:
parent
d881a01fec
commit
389c6e7b5e
1 changed files with 4 additions and 5 deletions
|
@ -317,7 +317,6 @@ def main():
|
||||||
module.fail_json(msg="Server is not configured as mysql slave")
|
module.fail_json(msg="Server is not configured as mysql slave")
|
||||||
|
|
||||||
elif mode in "changemaster":
|
elif mode in "changemaster":
|
||||||
print "Change master"
|
|
||||||
chm=[]
|
chm=[]
|
||||||
chm_params = {}
|
chm_params = {}
|
||||||
if master_host:
|
if master_host:
|
||||||
|
@ -329,22 +328,22 @@ def main():
|
||||||
if master_password:
|
if master_password:
|
||||||
chm.append("MASTER_PASSWORD=%(master_password)s")
|
chm.append("MASTER_PASSWORD=%(master_password)s")
|
||||||
chm_params['master_password'] = master_password
|
chm_params['master_password'] = master_password
|
||||||
if master_port:
|
if master_port is not None:
|
||||||
chm.append("MASTER_PORT=%(master_port)s")
|
chm.append("MASTER_PORT=%(master_port)s")
|
||||||
chm_params['master_port'] = master_port
|
chm_params['master_port'] = master_port
|
||||||
if master_connect_retry:
|
if master_connect_retry is not None:
|
||||||
chm.append("MASTER_CONNECT_RETRY=%(master_connect_retry)s")
|
chm.append("MASTER_CONNECT_RETRY=%(master_connect_retry)s")
|
||||||
chm_params['master_connect_retry'] = master_connect_retry
|
chm_params['master_connect_retry'] = master_connect_retry
|
||||||
if master_log_file:
|
if master_log_file:
|
||||||
chm.append("MASTER_LOG_FILE=%(master_log_file)s")
|
chm.append("MASTER_LOG_FILE=%(master_log_file)s")
|
||||||
chm_params['master_log_file'] = master_log_file
|
chm_params['master_log_file'] = master_log_file
|
||||||
if master_log_pos:
|
if master_log_pos is not None:
|
||||||
chm.append("MASTER_LOG_POS=%(master_log_pos)s")
|
chm.append("MASTER_LOG_POS=%(master_log_pos)s")
|
||||||
chm_params['master_log_pos'] = master_log_pos
|
chm_params['master_log_pos'] = master_log_pos
|
||||||
if relay_log_file:
|
if relay_log_file:
|
||||||
chm.append("RELAY_LOG_FILE=%(relay_log_file)s")
|
chm.append("RELAY_LOG_FILE=%(relay_log_file)s")
|
||||||
chm_params['relay_log_file'] = relay_log_file
|
chm_params['relay_log_file'] = relay_log_file
|
||||||
if relay_log_pos:
|
if relay_log_pos is not None:
|
||||||
chm.append("RELAY_LOG_POS=%(relay_log_pos)s")
|
chm.append("RELAY_LOG_POS=%(relay_log_pos)s")
|
||||||
chm_params['relay_log_pos'] = relay_log_pos
|
chm_params['relay_log_pos'] = relay_log_pos
|
||||||
if master_ssl:
|
if master_ssl:
|
||||||
|
|
Loading…
Reference in a new issue