mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-24 03:11:25 -07:00
Fix tls_requires data structure inconsistencies between modules
This commit is contained in:
parent
502bf58df1
commit
5460dec642
2 changed files with 6 additions and 4 deletions
|
@ -102,14 +102,15 @@ def get_tls_requires(cursor, user, host):
|
|||
if isinstance(res, dict):
|
||||
res = list(res.values())
|
||||
|
||||
if not res:
|
||||
# When user don't require SSL, res value is: ('', '', '', '')
|
||||
if not any(res):
|
||||
return None
|
||||
|
||||
if res[0] == 'ANY':
|
||||
return {'SSL': ''}
|
||||
return 'SSL'
|
||||
|
||||
if res[0] == 'X509':
|
||||
return {'X509': ''}
|
||||
return 'X509'
|
||||
|
||||
if res[1]:
|
||||
tls_requires['CIPHER'] = res[1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue