Commit graph

206 commits

Author SHA1 Message Date
Alexander Skiba
c242584bae
mysql_user: enabled autocommit to support MySQL 8 (#483)
* mysql_user: enabled autocommit to support MySQL 8

* Add changelog fragment

* Link to issue instead of pull request in changelog fragment

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

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2023-01-17 10:34:20 +01:00
Andrew Klychkov
4ad71775a6
README: update Matrix badge (#485) 2023-01-16 12:46:31 +01:00
Andrew Klychkov
3ff1fad5f3
Docs: change yes/no to true/false (#480) 2023-01-03 11:24:59 +01:00
hubiongithub
8a579b42e3
add service name to plugin pam/auth_pam usage (#445)
* add service name to plugin pam/auth_pam usage

* typo fixed

* MySLQ is using identified with auth_pam by ...  instead of identified with pam using ... like mariadb does

* a : in description lines breaks yaml syntax

* clearify documentation and add changelog fragment

* Update changelogs/fragments/445_add_service_name_to_plugin_pam_auth_pam_usage.yml

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

* Update plugins/module_utils/user.py

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

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2023-01-03 09:47:11 +01:00
Andrew Klychkov
eade7ec1f0
CI: add PR change detection (#473) 2022-12-09 14:50:37 +01:00
Laurent Indermühle
015f58ea5a
Update CONTRIBUTORS 2022-12-08 19:32:22 +01:00
Diego Gullo
6ac89ca1f6
Display a more informative error when InvalidPrivsError is raised (#465) (#466)
* Display a more informative error when InvalidPrivsError is raised (Issue #465)

Co-authored-by: Laurent Indermühle <laurent.indermuehle@pm.me>
2022-12-06 13:12:01 +01:00
Laurent Indermühle
4dac66382a
Add fixed version of Ubuntu (#470)
This is because ubuntu-latest link to ubuntu-22.04 which includes
cgroup-v2. I thinks our tests fails because of that. See
https://github.com/ansible-collections/news-for-maintainers/issues/28
for more information.
2022-12-06 08:41:04 +01:00
Andrew Klychkov
09e02320fd
README: Add matrix room + badge (#459)
* README: Add matrix room + badge

* improve
2022-11-01 12:59:06 +01:00
Gabriel PREDA
b9a6ec4f7d
* add socket option suggestion in documentation (#437)
* * add `socket` option suggestion in documentation

* white space fix

* * move first two at the end
2022-10-04 11:08:59 +02:00
Sviatoslav Sydorenko
8107530744
Sync GHA workflow w/ the collection template (#452)
* Sync GHA workflow w/ the collection template

* Drop the trailing pre-cmd semicolon

* Recover missing `-e` flag of `sed`

* Use relative paths for version configs

* Unquote `env.connector_version_file`

* Use string formatting to fix the substitution problem
2022-10-03 14:27:55 +02:00
Andrew Klychkov
b8e2c02e89
CI: add stable-2.14 to test matrix (#449) 2022-09-22 11:24:01 +02:00
R.Sicart
2cd29207f3
Fix: devel requires python 3.9 in roles CI (#444)
* Fix: devel requires python 3.9

Package 'ansible-core' requires a different Python: 3.8.13 not in '>=3.9'

* Exclude older version of Ansible when testing Python 3.9
2022-09-16 13:38:22 +02:00
Léo_chocolat
ff9f58e8d1
changelog: fix broken link in ansible docs (#446) 2022-09-16 09:15:29 +02:00
R.Sicart
7defd8e728
Release 3.5.1 commit (#443) 2022-09-09 15:22:00 +02:00
R.Sicart
2d75bc19b8
Fix privilege changing everytime (#438)
* Compare privileges from before and after manipulation

* Add unit tests

* Fix FIXME integration tests related to this issue

* Fix sanity check

* Fix assertion when appending privs in mysql_role_initial integration tests

* Fix pylint

* [ci-skip] Add changelog fragment

* Fix: missing fragment file extension

* Replace privileges_equal() by a comparison

* Fix: sanity pylint

* Fix: forgot to remove privileges_equal import from unit tests
2022-09-08 18:26:58 +02:00
Maxwell G
ea73d408c3
Combine REVIEW_CHECKLIST.md and CONTRIBUTING.md and fix links (#432) 2022-09-06 09:00:41 +02:00
Andrew Klychkov
3670b2adc6
Release 3.5.0 commit (#436) 2022-09-05 09:06:41 +02:00
R.Sicart
cc5cf98368
Fix: grant revoked priv (#434)
* Fix: exclude mysql 8 from test_mysql_user's 'Assert that priv did not change' test

* Add tests to verify that GRANT permission is present after user modification

* Fix: do not revoke GRANT permission when it's already allowed and present in priv parameter

* Deduplicate tests name

Easier to debug this way

* Fix assertions named 'GRANT permission is present'

* Only revoke grant option if it exists and absence is requested

* Fix assertion comments

* Fix: Only revoke grant option if it exists and absence is requested

* Avoid pointless revocations when ALL are granted

* Assert that priv did not change on mariadb also

* Fix: sanity and unity tests

* Format long lines

* Add changelog fragment

Co-authored-by: Laurent Indermühle <laurent.indermuehle@pm.me>
2022-09-02 13:40:06 +02:00
Андрей Неустроев
aef6a2040c
Add SOURCE_SSL_VERIFY_SERVER_CERT parameter (#435)
* Add SOURCE_SSL_VERIFY_SERVER_CERT parameter

* Rewiev fixs and add changelog fragment

* fix version

* Update changelogs/fragments/435-mysql_replication_verify_server_cert.yml

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

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-09-02 10:59:51 +02:00
Andrew Klychkov
f1d63e3fc8
Docs: add info how to cope with a protocol-related connection error using login_unix_socket argument (#420) 2022-08-26 11:38:41 +02:00
Laurent Indermühle
0a68bb270f
Is changed (#427)
* Refactor tests to use "is" and "is not" changed

* Refactor tests to use is succeeded or is failed

* Reformat indentation

* Add filter "bool" to prevent issues
2022-08-23 09:11:55 +02:00
Laurent Indermühle
61586ae4cc
Port stable 1 ci changes (#423)
* Add changes from stable-1 integrations tests (PR 418)

* Refactor to use connectors' info declared in setup_mysql

* Fix 2nd replication stop marked changed by mysqlclient
2022-08-16 09:15:50 +02:00
Andrew Klychkov
057f817111
MAINTAINERS file: add a new maintainer (#419) 2022-08-12 22:41:26 +02:00
Laurent Indermühle
97318559e5
Fix ci python requirements (#416)
* Add matrix for python and ansible-core versions for sanity tests

* Add python 3.9 to integrations tests

* Add python 3.9 to unit tests

* Reformat sort by python version first
2022-08-05 09:25:14 +02:00
Laurent Indermühle
c4e90f087d
Update galaxy.yml to the next expected version (#415) 2022-08-03 11:20:22 +02:00
Laurent Indermühle
af73fa0d76
Release 3.4.0 commit (#414)
* Changelog: Fix module name

* Release 3.4.0 commit
2022-08-03 11:03:17 +02:00
Andrew Klychkov
1776702b9d
Announce pipefail default change in community.mysql 4.0.0 (#408) 2022-06-30 11:38:21 +02:00
Laurent Indermühle
5108ca5e66
Fix mysqldump ignoring errors (#403)
* Add schema and tables for the tests

* Add tests for full dump with and without compression

* Add test for distinct dump with and without compression

* Fix sh not seeing errors for command before the pipe

sh is missing the pipefail flag. We must use bash for this.

* Add cleanup to prevent the following tests from failing

* Fix fqcn in module_defaults

* Add changelog fragment

* Add check to the error message to ensure we captured the right one

* Add option to activate the fix on systems with bash

* Fix errors when data schema is already absent

* Update changelogs/fragments/fix-256-mysql_dump-errors.yml

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

* Add markup for commands in the documentation string

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

* Add markup and next release version in the documentation string

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

* Fix missing dependency for MySQL 8

* Add pipefail to tests of uncompressed dumps to enure it still works

* Fix "bash command not found" if pipefail is used for uncompressed dump

* Fix sanity pep8

* Document example of dump with pipefail

* Add dedpulication to command construct

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

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-06-30 06:54:26 +02:00
Andrew Klychkov
6f87620d9b
README: update MariaDB versions we test against (#404) 2022-06-24 14:32:32 +02:00
Andrew Klychkov
b62a59cf5a
Update mariadb to 10.6.8 in test matrix (#370)
* Update mariadb to 10.6.8 in test matrix

* try 10.8.3

* change tarball path

* Change tarball name

* Add mariadb 10.8

* Fix

* Fix

* Fix
2022-06-24 13:50:19 +02:00
Chris Croome
0df46e0e67
Note added regarding the default config file, ~/.my.cnf (#400)
* Note added for https://github.com/ansible-collections/community.mysql/issues/394

* Update config file notes as discussed

* Update plugins/doc_fragments/mysql.py

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

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-06-16 15:17:45 +02:00
Andrew Klychkov
04aa13f6d6
mysql_replication: set MASTER_SSL=0 when primary_ssl is set to no (#397)
* mysql_replication: set MASTER_SSL=0 when primary_ssl is set to no

* Improve doc
2022-06-13 08:13:58 +02:00
Andrew Klychkov
8e79690a02
mysql_db: add chdir argument (#396) 2022-06-13 08:11:18 +02:00
Andrew Klychkov
2a3f8f6506
Update licensing information (#390) 2022-06-03 11:47:03 +02:00
Andrew Klychkov
482a0d8ee9
Release 3.3.0 commit (#389) 2022-06-02 08:23:25 +02:00
Maciej
2e9d50f274
Changed += to append because cmd is a list (#377)
Using += on a list cause some problems druing creation of mysql command:
/usr/bin/mysql   - - u s e r = r o o t   - - p a s s w o r d = ' ' --socket=/run/mysqld/mysqld.sock
2022-05-31 17:44:14 +02:00
betanummeric
ed3935abec
mysql_user: add "update_password: on_new_username" argument, "password_changed" result field (#365)
* mysql_user: add value 'on_new_username' to argument 'update_password'

* mysql_user: return "password_changed" boolean (true if the user got a new password)

* mysql_user: optimize queries for existing passwords

* mysql_user: add integration tests for update_password argument

* mysql_user: add description for "update_password: on_new_username" argument

* add changelog fragment

* formatting (PEP8)

* Update changelogs/fragments/365-mysql_user-add-on_new_username-and-password_changed.yml

Co-authored-by: Benjamin MALYNOVYTCH <bmalynovytch@users.noreply.github.com>

* Update changelogs/fragments/365-mysql_user-add-on_new_username-and-password_changed.yml

Co-authored-by: Benjamin MALYNOVYTCH <bmalynovytch@users.noreply.github.com>

* Update plugins/modules/mysql_user.py

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

* Update changelogs/fragments/365-mysql_user-add-on_new_username-and-password_changed.yml

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

* Update changelogs/fragments/365-mysql_user-add-on_new_username-and-password_changed.yml

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

Co-authored-by: Felix Hamme <felix.hamme@ionos.com>
Co-authored-by: Benjamin MALYNOVYTCH <bmalynovytch@users.noreply.github.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-05-31 16:00:24 +02:00
hubiongithub
51a38840d9
mysql_user: prevent password getting set for existing users on on_cre… (#342)
* mysql_user: prevent password getting set for existing users on on_create when plugin is used

* added changelog fragment

* format fix

* added substract_privs, to t list of arguments

* clarify the documetation

* additional documentation to password,plugin,plugin_hash_string,plugin_auth_string options, format fix on changelog

* Update plugins/modules/mysql_user.py

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

* Update plugins/modules/mysql_user.py

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

* Update plugins/modules/mysql_user.py

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

* linting

* linting

* linting

* linting

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-05-31 07:40:32 +02:00
betanummeric
05eccd9a1d
mysql_role: add examples for "members_must_exist" argument (#376)
* mysql_role: add examples for "members_must_exist" argument

* mysql_role: fix syntax in example

* Update plugins/modules/mysql_role.py

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

* Update plugins/modules/mysql_role.py

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

Co-authored-by: Felix Hamme <felix.hamme@ionos.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-05-30 09:59:20 +02:00
betanummeric
bf5086d19d
mysql_role: add argument "members_must_exist" (#369)
* mysql_role: add argument "members_must_exist" (boolean, default true)

The assertion that the users supplied in the "members" argument exist is only executed when the new argument "members_must_exist" is true, to allow opt-out.

* mysql_role: add integration tests for argument members_must_exist

* add changelog fragment

* mysql_role: fix behavior of members_must_exist argument

* Update plugins/modules/mysql_role.py

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

* Update changelogs/fragments/369_mysql_role-add-members_must_exist.yml

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

Co-authored-by: Felix Hamme <felix.hamme@ionos.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-05-27 12:11:17 +02:00
Andrew Klychkov
647461010d
mysql_query: fix false change reports when IF NOT EXISTS clause is used (#322)
* mysql_query: fix false change reports when IF NOT EXISTS clause is used

* Fix

* Fix doc, add fragment

* Improve doc
2022-05-25 16:19:31 +02:00
betanummeric
ceda7662d0
mysql_role: don't add members to a role when creating the role and "detach_members: true" is set (#367)
* mysql_role: don't add members to a role when creating the role and "detach_members: true" is set, add integration test

* add changelog fragment

* mysql_role: add author betanummeric

* Update changelogs/fragments/367-mysql_role-fix-deatch-members.yml

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

Co-authored-by: Felix Hamme <felix.hamme@ionos.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-05-25 11:47:39 +02:00
betanummeric
07a72865f7
mysql_role: fix and simplify role member detection (#368)
* mysql_role: fix and simplify role membership detection

* add changelog fragment

* Update changelogs/fragments/368-mysql_role-fix-member-detection.yml

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

Co-authored-by: Felix Hamme <felix.hamme@ionos.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-05-25 10:16:50 +02:00
Per Lundberg
c489cf1a37
Update CHANGELOG.rst (#364)
Fix broken link
2022-05-18 12:52:05 +02:00
Andrew Klychkov
cc950cb53a
Release 3.2.1 commit (#363) 2022-05-17 12:18:41 +02:00
Felix Fontein
b2e476cb1a
Add PSF-license.txt file (#356)
* Add PSF-license.txt file.

* Update with actual CPython 3.9.5 license.
2022-05-16 09:41:48 +02:00
Andrew Klychkov
f62d708bcf
Release 3.2.0 commit (#355) 2022-05-13 09:16:24 +02:00
Andrew Klychkov
f57ed38beb
Move CHANGELOG.rst at top level (#349) 2022-05-12 11:42:30 +02:00
Andrew Klychkov
eff87f952b
Drop support for Ansible 2.9 and ansible-base 2.10 (#343)
* Drop support for Ansible 2.9 and ansible-base 2.10

* Improve README
2022-05-12 10:50:26 +02:00