mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 08:13:08 +00:00
Merge pull request #14924 from mvgrimes/patch-1
Dynamically add ssl key to the mysql config hash iff needed
This commit is contained in:
@@ -31,11 +31,12 @@
|
||||
|
||||
def mysql_connect(module, login_user=None, login_password=None, config_file='', ssl_cert=None, ssl_key=None, ssl_ca=None, db=None, cursor_class=None, connect_timeout=30):
|
||||
config = {
|
||||
'host': module.params['login_host'],
|
||||
'ssl': {
|
||||
}
|
||||
'host': module.params['login_host']
|
||||
}
|
||||
|
||||
if ssl_ca is not None or ssl_key is not None or ssl_cert is not None:
|
||||
config['ssl'] = {}
|
||||
|
||||
if module.params['login_unix_socket']:
|
||||
config['unix_socket'] = module.params['login_unix_socket']
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user