summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/database/mysql/mysql_db.py
diff options
context:
space:
mode:
authorAndrew Klychkov <aaklychkov@mail.ru>2020-01-09 09:39:09 +0300
committerFelix Fontein <felix@fontein.de>2020-01-09 07:39:09 +0100
commit70bc351f31ed7010ce981ce839a26ace4e4765cd (patch)
tree8b2034ac2c85c89d2e92893cc6979acb5e03ace4 /lib/ansible/modules/database/mysql/mysql_db.py
parent963b8249ecac9bcd0709e91fc87716e6af1971c9 (diff)
downloadansible-70bc351f31ed7010ce981ce839a26ace4e4765cd.tar.gz
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
Diffstat (limited to 'lib/ansible/modules/database/mysql/mysql_db.py')
-rw-r--r--lib/ansible/modules/database/mysql/mysql_db.py4
1 files changed, 2 insertions, 2 deletions
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. "