mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-19 17:01:26 -07:00
tmp
This commit is contained in:
parent
915d125d70
commit
83b76a4804
3 changed files with 22 additions and 4 deletions
|
@ -1177,13 +1177,15 @@ def main():
|
|||
if check_implicit_admin:
|
||||
try:
|
||||
cursor, db_conn = mysql_connect(module, "root", "", config_file, ssl_cert, ssl_key, ssl_ca, db,
|
||||
connect_timeout=connect_timeout, check_hostname=check_hostname, charset=charset)
|
||||
connect_timeout=connect_timeout, check_hostname=check_hostname,
|
||||
charset=charset)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if not cursor:
|
||||
cursor, db_conn = mysql_connect(module, login_user, login_password, config_file, ssl_cert, ssl_key, ssl_ca, db,
|
||||
connect_timeout=connect_timeout, check_hostname=check_hostname)
|
||||
connect_timeout=connect_timeout, check_hostname=check_hostname,
|
||||
charset=charset)
|
||||
except Exception as e:
|
||||
module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s has the credentials. "
|
||||
"Exception message: %s" % (config_file, to_native(e)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue