diff --git a/lib/ansible/modules/database/mysql/mysql_db.py b/lib/ansible/modules/database/mysql/mysql_db.py index 4f5e79e197..206bf6f93a 100644 --- a/lib/ansible/modules/database/mysql/mysql_db.py +++ b/lib/ansible/modules/database/mysql/mysql_db.py @@ -143,7 +143,7 @@ def db_dump(module, host, user, password, db_name, target, all_databases, port, cmd += " --ssl-cert=%s" % pipes.quote(ssl_cert) if ssl_key is not None: cmd += " --ssl-key=%s" % pipes.quote(ssl_key) - if ssl_cert is not None: + if ssl_ca is not None: cmd += " --ssl-ca=%s" % pipes.quote(ssl_ca) if socket is not None: cmd += " --socket=%s" % pipes.quote(socket) @@ -190,14 +190,14 @@ def db_import(module, host, user, password, db_name, target, all_databases, port cmd.append("--user=%s" % pipes.quote(user)) if password: cmd.append("--password=%s" % pipes.quote(password)) - if socket is not None: - cmd.append("--socket=%s" % pipes.quote(socket)) if ssl_cert is not None: cmd.append("--ssl-cert=%s" % pipes.quote(ssl_cert)) if ssl_key is not None: cmd.append("--ssl-key=%s" % pipes.quote(ssl_key)) - if ssl_cert is not None: + if ssl_ca is not None: cmd.append("--ssl-ca=%s" % pipes.quote(ssl_ca)) + if socket is not None: + cmd.append("--socket=%s" % pipes.quote(socket)) else: cmd.append("--host=%s" % pipes.quote(host)) cmd.append("--port=%i" % port)