Copy/Paste error for ssl_ca (#51614)

* Copy/Paste error for ssl_ca

Whe `ssl_ca` is specified, the variable `ssl_cert` is checked. This is wrong

* fix connection over host/port
pull/51657/head
Strix 6 years ago committed by ansibot
parent 62f9b53962
commit 48642dd1d7

@ -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)

Loading…
Cancel
Save