Skip to content

Commit

Permalink
change deprecated parameter pw and db (ansible-collections#177)
Browse files Browse the repository at this point in the history
* change deprecated parameter pw to password

* change deprecated parameter db to database

* add changelog fragment

* Old plugin versions are no longer supported

* Use packaging version checking.

* Use stdlib version comparison

* Use parse_version from setuptools

* Revert to tuple/reduce version check

---------

Co-authored-by: Jorge-Rodriguez <[email protected]>
  • Loading branch information
ziegenberg and Jorge-Rodriguez authored Feb 10, 2023
1 parent 9acbd55 commit 2f151dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- mysql module utils - change deprecated connection parameters ``passwd`` and ``db`` to ``password`` and ``database`` (https://github.com/ansible-collections/community.mysql/pull/177).
4 changes: 2 additions & 2 deletions plugins/module_utils/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ def mysql_connect(module, login_user=None, login_password=None, config_file='',
if login_user is not None:
config['user'] = login_user
if login_password is not None:
config['passwd'] = login_password
config['password'] = login_password
if ssl_cert is not None:
config['ssl']['cert'] = ssl_cert
if ssl_key is not None:
config['ssl']['key'] = ssl_key
if ssl_ca is not None:
config['ssl']['ca'] = ssl_ca
if db is not None:
config['db'] = db
config['database'] = db
if connect_timeout is not None:
config['connect_timeout'] = connect_timeout
if check_hostname is not None:
Expand Down

0 comments on commit 2f151dc

Please sign in to comment.