diff --git a/changelogs/fragments/67337-fix-proxysql-mysql-cursor.yaml b/changelogs/fragments/67337-fix-proxysql-mysql-cursor.yaml new file mode 100644 index 00000000000..0bcb836e352 --- /dev/null +++ b/changelogs/fragments/67337-fix-proxysql-mysql-cursor.yaml @@ -0,0 +1,2 @@ +bugfixes: + - proxysql - fixed mysql dictcursor diff --git a/lib/ansible/modules/database/proxysql/proxysql_backend_servers.py b/lib/ansible/modules/database/proxysql/proxysql_backend_servers.py index 0c730b50eff..04a8de2962a 100644 --- a/lib/ansible/modules/database/proxysql/proxysql_backend_servers.py +++ b/lib/ansible/modules/database/proxysql/proxysql_backend_servers.py @@ -452,7 +452,7 @@ def main(): login_user, login_password, config_file, - cursor_class=mysql_driver.cursors.DictCursor) + cursor_class='DictCursor') except mysql_driver.Error as e: module.fail_json( msg="unable to connect to ProxySQL Admin Module.. %s" % to_native(e) diff --git a/lib/ansible/modules/database/proxysql/proxysql_global_variables.py b/lib/ansible/modules/database/proxysql/proxysql_global_variables.py index ddd7447fa6f..8436a76d62f 100644 --- a/lib/ansible/modules/database/proxysql/proxysql_global_variables.py +++ b/lib/ansible/modules/database/proxysql/proxysql_global_variables.py @@ -205,7 +205,7 @@ def main(): login_user, login_password, config_file, - cursor_class=mysql_driver.cursors.DictCursor) + cursor_class='DictCursor') except mysql_driver.Error as e: module.fail_json( msg="unable to connect to ProxySQL Admin Module.. %s" % to_native(e) diff --git a/lib/ansible/modules/database/proxysql/proxysql_mysql_users.py b/lib/ansible/modules/database/proxysql/proxysql_mysql_users.py index d4e14fc1c60..e0c7f5ff9af 100644 --- a/lib/ansible/modules/database/proxysql/proxysql_mysql_users.py +++ b/lib/ansible/modules/database/proxysql/proxysql_mysql_users.py @@ -420,7 +420,7 @@ def main(): login_user, login_password, config_file, - cursor_class=mysql_driver.cursors.DictCursor) + cursor_class='DictCursor') except mysql_driver.Error as e: module.fail_json( msg="unable to connect to ProxySQL Admin Module.. %s" % to_native(e) diff --git a/lib/ansible/modules/database/proxysql/proxysql_query_rules.py b/lib/ansible/modules/database/proxysql/proxysql_query_rules.py index cfb461e4042..f40617ad63a 100644 --- a/lib/ansible/modules/database/proxysql/proxysql_query_rules.py +++ b/lib/ansible/modules/database/proxysql/proxysql_query_rules.py @@ -547,7 +547,7 @@ def main(): login_user, login_password, config_file, - cursor_class=mysql_driver.cursors.DictCursor) + cursor_class='DictCursor') except mysql_driver.Error as e: module.fail_json( msg="unable to connect to ProxySQL Admin Module.. %s" % to_native(e) diff --git a/lib/ansible/modules/database/proxysql/proxysql_replication_hostgroups.py b/lib/ansible/modules/database/proxysql/proxysql_replication_hostgroups.py index 2a9acc6b4c2..c685f0863af 100644 --- a/lib/ansible/modules/database/proxysql/proxysql_replication_hostgroups.py +++ b/lib/ansible/modules/database/proxysql/proxysql_replication_hostgroups.py @@ -318,7 +318,7 @@ def main(): login_user, login_password, config_file, - cursor_class=mysql_driver.cursors.DictCursor) + cursor_class='DictCursor') except mysql_driver.Error as e: module.fail_json( msg="unable to connect to ProxySQL Admin Module.. %s" % to_native(e) diff --git a/lib/ansible/modules/database/proxysql/proxysql_scheduler.py b/lib/ansible/modules/database/proxysql/proxysql_scheduler.py index 41352d75c54..3ba7b678648 100644 --- a/lib/ansible/modules/database/proxysql/proxysql_scheduler.py +++ b/lib/ansible/modules/database/proxysql/proxysql_scheduler.py @@ -358,7 +358,7 @@ def main(): login_user, login_password, config_file, - cursor_class=mysql_driver.cursors.DictCursor) + cursor_class='DictCursor') except mysql_driver.Error as e: module.fail_json( msg="unable to connect to ProxySQL Admin Module.. %s" % to_native(e)