Commit graph

73 commits

Author SHA1 Message Date
Jorge-Rodriguez
8f337edbe9
Fix function signature 2021-02-07 10:31:42 +02:00
Jorge-Rodriguez
bb45038ce7
Fix password lock time check 2021-02-07 10:23:31 +02:00
Jorge Rodriguez (A.K.A. Tiriel)
64aae9ba08
Supply empty string to re.match if value is not defined 2021-02-07 10:23:30 +02:00
Jorge-Rodriguez
f41a9ce08b
Fix key error 2021-02-07 10:23:30 +02:00
Jorge-Rodriguez
0502359633
Fix docstring 2021-02-07 10:23:30 +02:00
Jorge-Rodriguez
58d21f6f0e
Remove reference to unused msg 2021-02-07 10:23:29 +02:00
Jorge-Rodriguez
de75697d5f
Check account_locking values 2021-02-07 10:21:45 +02:00
Jorge-Rodriguez
9a303ac55a
Update module documentation 2021-02-07 10:11:24 +02:00
Jorge-Rodriguez
800d9a553b
Update changelog 2021-02-07 10:08:38 +02:00
Jorge-Rodriguez
c2d5b97b7a
Add changelog fragment 2021-02-07 10:08:38 +02:00
Jorge-Rodriguez
9730eeb52c
Log account locking warnings only when locking is requested 2021-02-07 10:08:38 +02:00
Jorge Rodriguez (A.K.A. Tiriel)
aaf70204cb
Fix version added
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2021-02-07 10:08:37 +02:00
Jorge-Rodriguez
6d795eab69
Fix assertions for versions that do not support account locking 2021-02-07 10:08:37 +02:00
Jorge-Rodriguez
2f26a6681f
Add account locking warnings on user add 2021-02-07 10:08:36 +02:00
Jorge-Rodriguez
0532ebd6ca
Fix parsing of versions with dashes 2021-02-07 10:08:36 +02:00
Jorge-Rodriguez
da9d82ecc6
Fix version added 2021-02-07 10:08:36 +02:00
Jorge-Rodriguez
46d7f4106e
Make dictionary comprehension 2.6 compatible 2021-02-07 10:08:35 +02:00
Jorge-Rodriguez
5646003189
Fix parsing of versions with dashes 2021-02-07 10:08:35 +02:00
Jorge-Rodriguez
9ffdeb0be3
Fix assertions 2021-02-07 10:08:34 +02:00
Jorge-Rodriguez
be0244e5bc
Introduce account locking functionality 2021-02-07 10:08:06 +02:00
Andrew Klychkov
31bd2b567f Release 1.2.0: add changelog 2021-01-18 09:27:46 +03:00
Steve Teahan
b25fb5974d
mysql_user: refactor to reduce execute() calls (#76)
This module does not currently log the SQL statements that it executes.
A change was proposed to add this functionality, but it would require
modifications in many sections of the code due to how many cursor.execute()
statements there currently are. This change simply consolidates the
number of execute() calls where it is trivial to do so.
2021-01-15 13:44:03 +03:00
Steve Teahan
06907715d7
mysql_user: fixed encrypted option for MySQL 8.0 and test coverage (#79)
* mysql_user: fixed encrypted option for MySQL 8.0 and test coverage

The purpose of this change was originally to expand test coverage to
unblock #76, but an issue was detected with the encrypted parameter on
MySQL 8.0 in the process of writing the tests. Additionally,
user_password_update_test.yml had been disabled at some point, so I
opted to replace it with two new files that will focus on the password
and plugin auth paths.

* Updated tests to cover a couple of missing branches

* Skip tests that rely on sha256_password if pymysql < 0.9

* Cover the case where pymysql isn't installed for plugin tests

* Added better plugin auth checking to tests and other minor changes

* Fixed version detection to explicitly handle MariaDB

* Removed unneeded import from previous change

* Remove whitespace that was introduced by change that was removed

* Added unit tests for missing coverage
2021-01-14 08:27:05 +03:00
Andrew Klychkov
2de3a57021
mysql_user: Add SHOW_ROUTINE privilege support (#87)
* mysql_user: Add SHOW_ROUTINE privilege support

* add changelog fragment

Co-authored-by: Andrew Klychkov <andrew.klychkov@gmail.com>
2021-01-13 09:36:23 +03:00
Andrew Klychkov
9eb007969c Generating changelog for release 1.1.2, remove fragments 2020-12-18 11:29:36 +03:00
Andrew Klychkov
af0811d764 Change release version in galaxy.yml 2020-12-18 11:28:05 +03:00
Andrew Klychkov
2cf7d60976 Add release 1.1.2 changelog fragment 2020-12-18 11:26:24 +03:00
Andrew Klychkov
ebe503823a
mysql_replication: fix crashes caused by deprecated terminology (#71)
* mysql_replication: fix crashes caused by deprecated terminology

* Fix unrelated sanity errors

* Tests: mysql 8.0.21 -> 8.022

* Adjust integration tests

* Add version check to the tests

* Add debug statement

* Adjust mysql version

* Fix tests

* Add unit tests

* Add changelog fragment

* Improve code and coverage

* Get rid of extra blank line

* Improve coverage

* Change suggested
2020-12-18 11:17:18 +03:00
Andrew Klychkov
b7e828a092
mysql_db: fix false warning related to unsafe_login_password (#74) 2020-12-18 10:56:49 +03:00
steveteahan
20f9699199
mysql_user: Fixed change detection with append_privs (#69) (#72)
* mysql_user: Fixed change detection with append_privs (#69)

Prior to this change, mysql_user with append_privs would attempt to make
a change even if the current privileges were a superset of the new
privileges (shouldn't require any action).

* Fixed unrelated mysql_replication doc causing failures in CI

* Added fragments and check_mode tests

* Expanded priv append tests to cover additional case
2020-12-16 08:22:00 +03:00
Andrew Klychkov
d309d5af2d
mysql_user: fix documentation (#65)
* mysql_user: fix documentation

* Changed suggested

* Update plugins/modules/mysql_user.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/mysql_user.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-26 13:51:02 +03:00
Andrew Klychkov
ea54a44c76
mysql_info: fix documentation (#67) 2020-11-26 13:12:51 +03:00
Andrew Klychkov
549c7fe15a
mysql_variables: fix documentation (#66) 2020-11-26 13:12:31 +03:00
Andrew Klychkov
504bc87a4a
mysql_db: improve documentation formatting (#64) 2020-11-26 13:12:11 +03:00
Andrew Klychkov
09d0ce2ce0
Remove version from README (#61) 2020-11-17 11:22:21 +03:00
Jose Angel Munoz
bb99cf5b04
Add mysqlclient library reference in doc (#57) 2020-11-06 21:14:45 +03:00
Andrew Klychkov
2dcbd7846f
mysql_query, mysql_user: simple refactoring of type checks (#58)
* mysql_query: simple refactoring of query type check

* do the same for mysql_user

* Improve integration test coverage
2020-11-06 13:12:07 +03:00
Andrew Klychkov
b2bde48020
mysql_query: add note about running queries from file via mysql_db module (#55) 2020-11-05 13:29:24 +03:00
Andrew Klychkov
c3dd146220 Generate changelog for release 1.1.1, remove fragments 2020-11-03 21:46:32 +03:00
Andrew Klychkov
5b0aed749e Add changelog 1.1.1 release summary 2020-11-03 21:43:40 +03:00
Andrew Klychkov
ae9c0a1751
mysql_query: fix failing when single-row query contains commas (#53)
* mysql_query: fix failing when single-row query contains commas

* add changelog fragment

* Improve documentation and tests

* Fix typo

* Improve test coverage

* Fix

* Remove the irrelevant note

* change suggested
2020-11-03 15:04:39 +03:00
Andrew Klychkov
0dfd63a4cb
Update README.md and galaxy.yml (#48) 2020-10-14 09:18:06 +03:00
Andrew Klychkov
ffc4f4eb94 Add release changelog 2020-10-13 16:17:58 +03:00
Andrew Klychkov
82ad06e072
mysql modules: fix failing when \!include_dir is in config file (#47)
* mysql modules: fix failing when \!include_dir is in .my.cnf

* Add changelog fragment

* fix CI

* fix CI

* Fix CI

* Fix CI

* Fix comment
2020-10-13 16:05:39 +03:00
Jorge Rodriguez (A.K.A. Tiriel)
8c79011dbd
Disable hostname check (#38)
* Add changelog fragment

* Add check_hostname option

* Propagate check_hostname option across the collection

* Update documentation fragment

* Propagate test to all other plugins

* Remove stray line

* Give test user privileges to run test operations

* Extend integration tests job matrix

* Add caution note to documentation fragment.

* Update matrix job name

* Rearrange job matrix

* Fix sanity issues

* Fix issue with mysqldb silently failing to update out of range variables

* Fix variable overwrite

* Ignore `check_hostname` when using MySQLdb

* Update plugins/doc_fragments/mysql.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* Update plugins/doc_fragments/mysql.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* Update changelogs/fragments/35-disable-hostname-check.yml

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-10-12 21:19:43 +03:00
John R Barker
dc98327483
Link to latest plugin docs (not 2.9) 2020-10-11 06:10:25 +01:00
Jorge Rodriguez (A.K.A. Tiriel)
9a377f6d91
module_utils: to add a destructor, in order to explicitly close the connection when the Connection object is GC'd (#44)
* Monkey patch the Connection class

* Add changelog fragment
2020-10-08 08:24:32 +03:00
Andrew Klychkov
f6d552d95e
Update galaxy.yml for the next expected release version, update README (#42) 2020-10-01 10:11:19 +03:00
Andrew Klychkov
e669901f3d Generate CHANGELOG.rst 2020-10-01 08:17:20 +03:00
Andrew Klychkov
b1df34c08a Add 1.0.2.yml fragment for release 2020-10-01 08:15:33 +03:00