Commit graph

40 commits

Author SHA1 Message Date
Andrew Klychkov
853db5a2a4
mysql_replication: add deprecation warning about future replacement of Is_Slave and Is_Master return values, add alternatives (#147)
* mysql_replication: add deprecation warning about future replacement of Is_Slave and Is_Master return values, add alternatives

* Add changelog fragment
2021-04-16 06:34:35 +02:00
Andrew Klychkov
1790664c00
mysql_replication: replace the word slave with replica in messages (#144)
* mysql_replication: replace the word slave with replica in messages

* Add changelog fragment

* Add announcements
2021-04-15 09:38:32 +02:00
Jorge Rodriguez (A.K.A. Tiriel)
dc522cc5d3
Deprecate REQUIRESSL privilege (#132)
* Deprecate REQUIRESSL privilege

* Add missing whitespace

* Fix according to PR review

* Fix conditional check

* Fix privilege string parsing

* Add unit tests for the new function

* Add integration tests

* Fix parentheses indentation

* Cover alternative error message

* Fix privileges

* Limit verification of access denied to pymysql connector

* Fix REQUIRE SSL verification tests
2021-04-10 07:01:15 +02:00
Norbert Varzariu
0bdf9e2ee7
update docs on check_hostname corresponding to mysqls cli --ssl switch (#123)
Signed-off-by: Norbert Varzariu <loomsen@gmail.com>
2021-03-21 21:30:28 +02:00
Jorge Rodriguez (A.K.A. Tiriel)
11958ec46a
Handle divergences between MySQL and MariaDB (#103)
* Initial attempt

* First functional approach

* Remove unused imports

* Add dychotomy handling for mysql_replication

* Fix cursor lookup

* Fix sanity tests

* Cleanup implementation conditional import

* Fix unit tests

* Fix conditional import to satisfy both sanity and integration tests

* Add changelog fragment
2021-03-16 09:15:19 +01:00
Sebastian Gumprich
a5ee4b3d1a
add mysql_full_version and suffix return variable (#115)
* add mysql_full_version and suffix return variable

add changelog fragment

* rephrase changelog fragment

* Update plugins/modules/mysql_info.py

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

* Add changes as per PR review

* Add tests for new suffix output parameter

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Jorge-Rodriguez <jorge.rodriguez@futurice.com>
2021-03-16 09:10:52 +02:00
Daniel Ziegenberg
2254b29178
change deprecated parameter pw and db (#116)
* change deprecated parameter pw to password

* change deprecated parameter db to database

* add changelog fragment
2021-03-16 07:15:12 +02:00
Andrew Klychkov
bd86e249d0
mysql_replication: add a reference to how to encrypted connection options (#118)
* mysql_replication: add a reference to how to encrypted connection options

* Fix sanity
2021-03-15 09:39:14 +01:00
Felix Fontein
884310cf24
Mark master_ssl_key as no_log=False. (#117) 2021-03-15 07:30:53 +01:00
Andrew Klychkov
baea97d24c
mysql_user: Add REPLICA MONITOR privilege to supported (#108)
* mysql_user: Add REPLICA MONITOR privilege to supported

* Add changelog fragment
2021-03-11 16:17:49 +01:00
Andrew Klychkov
979588e2cd
mysql_user: add proper handling of INSERT, UPDATE, REFERENCES on columns (#107)
* mysql_user: add proper handling of INSERT, UPDATE, REFERENCES on columns

* Add changelog fragment

* fix sanity

* fix CI

* fix sanity

* fix CI

* make the assertion fairer

* Improve
2021-03-08 17:18:04 +01:00
Andrew Klychkov
2694464ffb
mysql_user: when grant select on columns, the module always report the state has changed (#100)
* mysql_user: fix the module is not idempotent when there is SELECT on columns granted

* add changelog fragment

* fix

* Add unit tests for has_select_on_col function

* Add unit tests for sort_column_order function

* Add unit tests for handle_select_on_col function

* Update a comment
2021-03-03 10:58:57 +01:00
Andrew Klychkov
e8dc2f2476
mysql_replication: deprecation of slave related options, adding alternatives (#97)
* mysql_replication: deprecation of slave related options, adding alternatives

* Add changelog fragment

* Integration tests getslave -> getreplica

* Change the rest of offending choices/comments

* Add announcement about replacing SLAVE to REPLICA in messages

* Deprecate offending values
2021-03-01 10:45:35 +01:00
Tom Van Looy
24a4137982
mysql_user: remove duplicate of REPLICATION SLAVE entry from valid privs frozenset (#95) 2021-02-10 09:38:47 +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
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
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
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
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
6322a65dbb
mysql_user: fix error when modifying user with host_all (#40)
* mysql_user: fix error when modifying user with host_all

* Add changelog fragment and CI tests

* Update changelogs/fragments/40-mysql_user_fix_error_when_host_all_used.yml

Co-authored-by: Jorge Rodriguez (A.K.A. Tiriel) <jorge.rodriguez@tiriel.eu>

Co-authored-by: Jorge Rodriguez (A.K.A. Tiriel) <jorge.rodriguez@tiriel.eu>
2020-09-30 22:37:42 +03:00
Andrew Klychkov
94b383a6dc
mysql_db: fix false warning related to unsafe_login_password (#34)
* mysql_db: fix false warning when use_unsafe_password is set

* add changelog fragment

* fix fragment

* improve fragment
2020-09-28 08:17:04 +03:00
Andrew Klychkov
7719360c83
Add clarification about requirements (#24) 2020-09-21 20:59:25 +03:00
Jorge Rodriguez (A.K.A. Tiriel)
6e040e1496
Add test to verify TLS requirements are removed (#26)
* Add test to verify TLS requirements are removed

* Fix cursor parsing

* small fixes

* Refactor TLS tests into their own file

* Fix TLS requirements parsing
2020-09-21 07:39:08 +03:00
Jorge Rodriguez (A.K.A. Tiriel)
36e7e6603e
Add TLS connection parameters (#9)
* Add TLS connection parameters

* Add check mode tests

* Fix check mode indentation

* Run MySQL commands with the mysql_command variable

* Fix typo

* Restore code lost during cherry pick

* Fix conditionals to accomodate for MySQL v8

* Fix equal operators

* Remove Black formatting in an attempt to make codecov happy

* Remove deprecation notice

* Fix closing bracket

* Remove code duplication
2020-07-28 09:44:52 +03:00
Andrew Klychkov
c255d7ece2
mysql modules: fix examples to use FQCN (#3) 2020-07-13 10:52:49 +01:00
Felix Fontein
4a3cfa6a32
Fixups (#2)
* Add changelog fragments from c.g.

* Adjust version_added to 0.1.0, which comes closer to the truth.

* Add changelogs/.plugin-cache.yaml to gitignore.
2020-07-12 12:35:55 +01:00
Ben Mildren
c26bc095ad
initial commit (#1)
* initial commit

* removed remaining references to community.general

* enabled integration pipeline

* switched from preconfigured replication topology to simple multinode install

* updated version from 1.0.0 to 0.1.0
2020-07-10 17:16:58 +01:00