mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-05 10:10:32 -07:00
Fix TLS requirements parsing
This commit is contained in:
parent
2c0be4a73f
commit
b679befe43
1 changed files with 5 additions and 1 deletions
|
@ -434,7 +434,11 @@ def get_tls_requires(cursor, user, host):
|
|||
pattern = r"(?<=\bREQUIRE\b)(.*?)(?=(?:\bPASSWORD\b|$))"
|
||||
requires_match = re.search(pattern, require_line)
|
||||
requires = requires_match.group().strip() if requires_match else ""
|
||||
if len(requires.split()) > 1:
|
||||
if any((requires.startswith(req) for req in ('SSL', 'X509', 'NONE'))):
|
||||
requires = requires.split()[0]
|
||||
if requires == 'NONE':
|
||||
requires = None
|
||||
else:
|
||||
import shlex
|
||||
|
||||
items = iter(shlex.split(requires))
|
||||
|
|
Loading…
Add table
Reference in a new issue