mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-20 01:11:27 -07:00
modules: add charset connection option
This commit is contained in:
parent
dad555a536
commit
915d125d70
7 changed files with 117 additions and 3 deletions
|
@ -148,6 +148,7 @@ def main():
|
|||
check_hostname = module.params['check_hostname']
|
||||
config_file = module.params['config_file']
|
||||
query = module.params["query"]
|
||||
charset = module.params["charset"]
|
||||
|
||||
if not isinstance(query, (str, list)):
|
||||
module.fail_json(msg="the query option value must be a string or list, passed %s" % type(query))
|
||||
|
@ -180,7 +181,8 @@ def main():
|
|||
config_file, ssl_cert, ssl_key, ssl_ca, db,
|
||||
check_hostname=check_hostname,
|
||||
connect_timeout=connect_timeout,
|
||||
cursor_class='DictCursor', autocommit=autocommit)
|
||||
cursor_class='DictCursor', autocommit=autocommit,
|
||||
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. "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue