Ignore check_hostname when using MySQLdb

This commit is contained in:
Jorge-Rodriguez 2020-10-04 10:37:38 +03:00
parent 3aed674194
commit 5d9469831b
No known key found for this signature in database
GPG key ID: 43153D1EFD8F7D90
8 changed files with 38 additions and 9 deletions

View file

@ -87,8 +87,6 @@ def mysql_connect(module, login_user=None, login_password=None, config_file='',
config['ssl']['check_hostname'] = check_hostname
else:
module.fail_json(msg='To use check_hostname, pymysql >= 0.7.11 is required on the target host')
else:
module.fail_json(msg='Connector %s does not support the check_hostname option' % mysql_driver.__name__)
if _mysql_cursor_param == 'cursor':
# In case of PyMySQL driver: