From 70bc351f31ed7010ce981ce839a26ace4e4765cd Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Thu, 9 Jan 2020 09:39:09 +0300 Subject: mysql_query: new module (#65941) * tmp * mysql_query: new module * remove irrelevant changes from mysql.py * add autocommit keyarg to mysql_connect * add basic CI tests * tmp * fix CI tests * add CI tests * fix comment in CI tests * remove path_to_script option * refactoring * change tests formatting * add single_transaction param * fix sanity * add note * fix --- lib/ansible/modules/database/mysql/mysql_db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/ansible/modules/database/mysql/mysql_db.py') diff --git a/lib/ansible/modules/database/mysql/mysql_db.py b/lib/ansible/modules/database/mysql/mysql_db.py index 7a0f78dd36..d92115448f 100644 --- a/lib/ansible/modules/database/mysql/mysql_db.py +++ b/lib/ansible/modules/database/mysql/mysql_db.py @@ -501,8 +501,8 @@ def main(): if db == ['all']: module.fail_json(msg="name is not allowed to equal 'all' unless state equals import, or dump.") try: - cursor = mysql_connect(module, login_user, login_password, config_file, ssl_cert, ssl_key, ssl_ca, - connect_timeout=connect_timeout) + cursor, db_conn = mysql_connect(module, login_user, login_password, config_file, ssl_cert, ssl_key, ssl_ca, + connect_timeout=connect_timeout) except Exception as e: if os.path.exists(config_file): module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s has the credentials. " -- cgit v1.2.1