Commit graph

100 commits

Author SHA1 Message Date
Andrew Klychkov
1cb39cce0a
Release 2.3.1 commit (#236) 2021-10-19 12:41:22 +02:00
Andrew Klychkov
55a8ecd64e
[stable-2] Backport stable 2 5 (#235)
* Copy ignore-2.12.txt to ignore-2.13.txt (#225)

(cherry picked from commit 4f205ef540)

* CI matrix update (#226)

* CI matrix update

* Fix test_mysql_user

* Fix CI

* Fix CI

* Fix CI

* Fix CI

* Fix CI

(cherry picked from commit fc984b28aa)

* integration tests: remove superfluous debug task (#228)

* integration tests: remove superfluous debug task

* Turn off integration tests against devel

(cherry picked from commit f47d4635f1)

* mysql_user: fix broken compatibility for priviledge aliases (#233)

* mysql_user: fix broken compatibility for priviledge aliases

* add changelog fragment

* fix changelog fragment

* Improve formatting

(cherry picked from commit bb3e9fd3fa)
2021-10-19 12:20:30 +02:00
Andrew Klychkov
a6bacefc41
Release 2.3.0 commit (#220) 2021-09-23 13:39:01 +02:00
Andrew Klychkov
c5676ff0c9
[stable-2] Backport stable 2 4 (#219)
* Fix wrong impl for mysql (#210)

If 'mariadb' in version info, the db instance should be mariadb(reverse in code) rather than mysql.

(cherry picked from commit 663590689f)

* Update README.md (#216)

(cherry picked from commit 4de0e25ea0)

* mysql_user: replace VALID_PRIVS by get_valid_privs() function (#217)

* mysql_user: replace VALID_PRIVS by get_valid_privs() function

* Add EXTRA_PRIVS in case we need to add more privs in the future

* Add changelog fragment

(cherry picked from commit 0ce1fa1634)

Co-authored-by: int32bit <krystism@gmail.com>
Co-authored-by: R.Sicart <roger.sicart@gmail.com>
2021-09-23 12:51:32 +02:00
Andrew Klychkov
0c462c84ff
Release 2.2.0 commit (#218) 2021-09-23 11:32:06 +02:00
Andrew Klychkov
77bd3bfa2e
[stable-2] mysql_info: fix TypeError failure when there are databases that do not contain tables (#205) (#208)
* mysql_info: fix TypeError failure when there are databases that do not contain tables (#205)

* mysql_info: fix TypeError failure when there are databases that do not contain tables

* Add changelog fragment

(cherry picked from commit a1f419d541)

* Fix sanity errors (#206)

(cherry picked from commit 8a17e43eae)
2021-08-20 09:50:41 +02:00
Andrew Klychkov
2508c420ce
Update galaxy.yml after release (#202) 2021-08-11 11:12:34 +02:00
Andrew Klychkov
04c0f9f049
Release 2.2.0-a1 commit (#201) 2021-08-11 10:20:05 +02:00
Andrew Klychkov
a8e2c5290b
mysql_role: new module (#189) (#200)
* mysql_role: new module

* fixes

* fixes

* Add the role class

* Check if role exists

* role.add()

* role.__get_members

* tmp

* tmp

* Change tests

* Fix

* Fix

* add_members()

* get_privs()

* tmp

* __extract_grants() filler version

* Before big work

* tmp

* drop()

* tmp

* tmp

* Big changes

* Fix

* append_members, detach_members, append_privs

* tmp

* admin option

* Add tests

* Add tests

* Fix tests

* Remove debug warning

* Fix tests

* Add documentation

* Fix MariaDB case

* Fix MariaDB

* Fix MariaDB

* Fix MariaDB

* Fix MariaDB

* Fix MariaDB

* Fix

* Fix

* Remove debug warning

* Add try-except block

* tmp

* tmp

* tmp

* Fix

* Add err handling

* Add user check

* Check admin in db

* Fix CI

* Fix CI

* Fix CI

* Fix CI

* Fix

* Add mutually exclusive options

* Small refactoring, documenting

* Documenting, refactoring

* Change docs

* Refactoring

* Refactoring

* Refactoring

* Add unit tests

* Update README.md

(cherry picked from commit ce2b269f84)
2021-08-11 09:46:50 +02:00
Andrew Klychkov
fa62fd30d8
Release 2.1.1 commit (#199) 2021-08-11 08:47:16 +02:00
Andrew Klychkov
0c261b76d6
mysql_query: correctly reflect changed status in replace statements (#193) (#195)
* mysql_query: correctly reflect changed status in replace statements.

* Fix the wrong indent.

(cherry picked from commit 9055bb4c8c)

Co-authored-by: Tong He <68936428+unnecessary-username@users.noreply.github.com>
2021-08-10 14:25:29 +02:00
Andrew Klychkov
5d7451aed6
[stable-2] Doc PRs backport (#194)
* Update README.md (#183)

* Update README.md

* Change IRC ref

(cherry picked from commit 69012a2eb9)

* README: fix link (#184)

(cherry picked from commit 8ab6ea7714)

* README: fix the channel name (#185)

(cherry picked from commit cd759924fd)

* CONTRIBUTING.md: replace the content with a link to Ansible contributing guidelines (#187)

(cherry picked from commit 56a214885a)

* Update README (#186)

* Update README

* Fix

* Fix

* Fix

* Fix

* Add Libera.Chat link

(cherry picked from commit adb201a795)

* fix typo (#190)

"optoin" -> "option"

(cherry picked from commit 596ba0cedb)

* Update README.md (#191)

* Update README.md

* Update README.md

(cherry picked from commit 6f02cb266a)

* Add MAINTAINING.md, update README.md (#192)

(cherry picked from commit 0fabb2b77a)

Co-authored-by: Baptiste Mille-Mathias <baptiste.millemathias@gmail.com>
2021-08-10 14:15:49 +02:00
Andrew Klychkov
2e748efb02
[stable-2] Backport of all the doc PRs merged to main since the last backporting (#182)
* Add CONTRIBUTORS file (#166)

(cherry picked from commit ac927fdb08)

* Add documentation for privs with functions and procedures (#169)

(cherry picked from commit 6bce48e771)

* Update README.md (#168)

* Update README.md

* Fix

* Add MAINTAINERS file

(cherry picked from commit 479edd81d1)

* Improve wording in README (#170)

* Improve wording in README

* Update README.md

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>
(cherry picked from commit c909aa2182)

* Update REVIEW_CHECKLIST.md (#171)

(cherry picked from commit 2236110bae)

* README: add a note how people can complain (#172)

* README: add a note how people can complain

* Change

* Improve

* Update README.md

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>
(cherry picked from commit be4e84a92a)

* README: fix typos (#174)

(cherry picked from commit 2a80c301a6)

* README.md: Add link to IRC (#175)

(cherry picked from commit 3335a95ba5)

* README.md, CONTRIBUTING.md: add links to the Maintainer guidelines (#179)

(cherry picked from commit 8fad3f85b8)

* Update README (#181)

(cherry picked from commit 6d9288d19b)

Co-authored-by: Alexander Skiba <ghostlyrics@gmail.com>
2021-06-09 10:38:17 +02:00
Andrew Klychkov
a68c83f7b5
Update next expected release version in galaxy.yml (#158) 2021-04-23 16:07:29 +02:00
Andrew Klychkov
b32380a9e1
Release 2.1.0 commit (#157) 2021-04-23 15:11:57 +02:00
Andrew Klychkov
34a300d5f0
mysql: revert changes made in PR 116 (#153) (#155)
* mysql: revert changes made in PR 116

* Add changelog fragment

* Fix CI

* Fix CI

* Fix CI

* Update CI

* Fix CI

(cherry picked from commit 738343d64c)
2021-04-23 14:08:36 +02:00
Andrew Klychkov
d9651f37d3
mysql_replication: Add aliases to "master" options, add alternatives to "master" state options, add announcement (#150) (#152)
* mysql_replication: Add aliases, add alternatives for the state option, announce major changes

* Change tests

* Add changelog fragment

* Fix changelog

* Update plugins/modules/mysql_replication.py

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

* Update plugins/modules/mysql_replication.py

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>
(cherry picked from commit c8f9b1cd3f)
2021-04-23 07:31:02 +02:00
Andrew Klychkov
da7e73ef6e
mysql_replication: add deprecation warning about future replacement of Is_Slave and Is_Master return values, add alternatives (#147) (#149)
* mysql_replication: add deprecation warning about future replacement of Is_Slave and Is_Master return values, add alternatives

* Add changelog fragment

(cherry picked from commit 853db5a2a4)
2021-04-16 07:23:53 +02:00
Andrew Klychkov
5fbac22486 Update collection version to the next expected in galaxy.yml 2021-04-15 10:48:56 +02:00
Andrew Klychkov
900899740b Release 2.0.0 commit 2021-04-15 10:21:17 +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
Andrew Klychkov
6342fb6f23
Update README.md (#139) 2021-04-07 16:54:41 +02:00
Andrew Klychkov
dad555a536
Tests: add ansible 2.11 support (#138)
@Andersson007 thanks for this PR
2021-04-06 11:12:27 +03:00
Andrew Klychkov
ba791bf983
Fix REVIEW_CHECKLIST.md (#133) 2021-03-31 08:54:51 +02:00
Andrew Klychkov
ecd15c83f7
Add refs to the committer guidelines (#131) 2021-03-29 11:48:11 +02:00
Andrew Klychkov
2960748473
CONTRIBUTING.md: add a reference to REVIEW_CHECKLIST.md (#130) 2021-03-28 07:54:55 +02:00
Andrew Klychkov
ca963b23c0
Add review_checklist.md (#127)
* Add review_checklist.md

* Add general tips

* Improve general tips

* fix

* fix

* fix

* fix

* fix

* fix

* Fix

* Update review_checklist.md

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Fix

* Update review_checklist.md

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update review_checklist.md

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Rename checklist

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update REVIEW_CHECKLIST.md

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

* Add suggested

* Add clarifications

Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Jorge Rodriguez (A.K.A. Tiriel) <jorge.rodriguez@tiriel.eu>
2021-03-27 10:03:03 +01:00
Andrew Klychkov
60646bcadb
Improve CONTRIBUTING.md (#129) 2021-03-26 21:20:50 +02:00
Jorge Rodriguez (A.K.A. Tiriel)
fcb459499e
Add discussions section (#126)
* Add discussions section

* Syntax improvements

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
2021-03-23 09:09:01 +01:00
Jorge Rodriguez (A.K.A. Tiriel)
e5bf8836fa
Add note about the contribution guide (#125)
* Add note about the contribution guide

* Update README.md

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
2021-03-22 09:51:57 +01:00
Andrew Klychkov
f0c917e606
Add CONTRIBUTING.md (#112)
* Add CONTRIBUTING.md

* Fix suggested

* Fix suggested

* Fix suggested

* Update CONTRIBUTING.md

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Fix

* Change suggested

* Add an option

* Add an example

* Fix

* Update CONTRIBUTING.md

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update CONTRIBUTING.md

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

* Fix

* Fix suggested

* Update CONTRIBUTING.md

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Add git installed mentioned

* Update CONTRIBUTING.md

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

* Add suggested

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Fix

* Update CONTRIBUTING.md

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

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Fix

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Update CONTRIBUTING.md

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

* Update CONTRIBUTING.md

Co-authored-by: Sandra McCann <samccann@redhat.com>

Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Jorge Rodriguez (A.K.A. Tiriel) <jorge.rodriguez@tiriel.eu>
2021-03-22 08:58:22 +01: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
fc2dd0079f
Add .keep file to changelog/fragments to make it always present (#113) 2021-03-10 18:16:18 +01:00
Andrew Klychkov
e8cb81b30e Release 1.3.0 commit 2021-03-08 17:22:17 +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
Michael S
faab501326
Update README.md - Update ext. documentation links (#102) 2021-02-25 17:16:44 +02: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
Andrew Klychkov
09ac98adb8
Fix galaxy.yml (#94) 2021-02-08 18:24:19 +03: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