Commit graph

309 commits

Author SHA1 Message Date
Laurent Indermuehle
2e2780b8f1
Revert "cut option maria_role as it as nothing to do with roles"
This reverts commit de1cbaea062c9169dcf1b8b2e4d844446b421b89.
Mariadb write the 'host' of a role as '' while mysql write '%'.
2023-10-11 16:51:51 +02:00
Laurent Indermuehle
7f6d5f5622
cut option maria_role as it as nothing to do with roles
This was introduced in #189. To my knowledge, there is no difference
between MySQL and MariaDB regarding roles or when you call a user by
its name alone. Both works if the host it '%'. Same for roles.
2023-10-11 16:51:51 +02:00
Laurent Indermuehle
34505c9b4f
add option to not summarize all privileges
We summarize ALL for mysql_info, but mysql_user needs to compare
actual privileges with the ones provided by ansible.
2023-10-11 16:51:51 +02:00
Laurent Indermuehle
7036490e7e
spelling 2023-10-11 16:51:51 +02:00
Laurent Indermuehle
970897cc46
Revert non relevant changes to have cleaner patch 2023-10-11 16:51:50 +02:00
Laurent Indermuehle
dbfc252ca5
add real name for MySQL 8 privileges 2023-10-11 16:51:50 +02:00
Laurent Indermuehle
5477603583
Revert "sync fork with upstream main"
This reverts commit 77593b7a91e8d417eead0d3d5366ba991c767565.
I imported PR569 to be able to test on my fork, but to avoid polluting
this patch I now revert those commit.
2023-10-11 16:51:50 +02:00
Laurent Indermuehle
d38caa264f
change struct to be able to call a specific sub-list 2023-10-11 16:51:50 +02:00
Laurent Indermuehle
03cda09ec1
prevent warnings 2023-10-11 16:51:50 +02:00
Laurent Indermuehle
318f95c0a9
typo 2023-10-11 16:51:50 +02:00
Laurent Indermuehle
4e4d50112a
fix column case to be identical on source and destination 2023-10-11 16:51:50 +02:00
Laurent Indermuehle
3c3ca1bbe9
Add tests to reproduce issue with uppercase tables from #399 2023-10-11 16:51:50 +02:00
Laurent Indermühle
776cb51f25
Update plugins/module_utils/mysql.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2023-10-11 16:51:50 +02:00
Laurent Indermühle
b081ca495b
Update changelogs/fragments/lie_mysql_info_users_privs.yml
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2023-10-11 16:51:49 +02:00
Laurent Indermühle
9b3f0c6cad
Update plugins/modules/mysql_info.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2023-10-11 16:51:49 +02:00
Laurent Indermuehle
d7de96a601
document that sha256 and caching_sha2 plugins doesn't work properly
Even if you use print_identified_with_as_hex to prevent the password to
contains binary characters. I think this is because PyMySQL and
mysqlclient wrap the password in quote. We could try to convert to
another python connector, like mysql-connector-python.
2023-10-11 16:51:49 +02:00
Laurent Indermuehle
7b7d2f5500
document correct return form 2023-10-11 16:51:49 +02:00
Laurent Indermuehle
f79ee2b83c
Update variable name for consistency 2023-10-11 16:51:49 +02:00
Laurent Indermuehle
56582f52a2
sanity 2023-10-11 16:51:49 +02:00
Laurent Indermuehle
0bcfdb72ab
fix users with multiple schemas with ALL PRIVILEGES only showing first 2023-10-11 16:51:49 +02:00
Laurent Indermuehle
40f47f6828
Cut support of Proxy privileges because it causes too many issues 2023-10-11 16:51:49 +02:00
Laurent Indermuehle
eee4225ec4
Add shortening of ALL PRIVILEGES for MySQL 8 that return a big list 2023-10-11 16:51:49 +02:00
Laurent Indermuehle
77c6a68a02
document how to use mysql_info to clone accounts to another server 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
213d6b8a5a
fix tests teardown error if db delete before users 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
008f92230b
fix tests failing when recreating root account 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
62e9ad7812
fix tests after keys returned have change in previous commit 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
ddd3812574
fix case when user as no other privileges than USAGE 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
122625c477
fix space in front of first privilege of the list 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
74ffacfa0f
fix key for username in the output to match mysql_user input 2023-10-11 16:51:48 +02:00
Laurent Indermuehle
af327daa8e
fix key for privileges in the output to match mysql_user input 2023-10-11 16:51:48 +02:00
Laurent Indermühle
28c247a14c
add link to the PR
Co-authored-by: Markus Bergholz <git@osuv.de>
2023-10-11 16:51:48 +02:00
Laurent Indermuehle
4ee6659b54
cut unused import (sanity) 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
f80ef4f9b4
fix sanity tests for python 2.6 the right way (my bad) 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
4093de51dd
fix sanity tests for python 2.6 in ansible-core 2.12 for good 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
89b42e2b83
fix sanity tests for Python 2.6 found in ansible-core 2.12 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
77c7beb514
fix case when fetch return a tuple instead of a dict 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
319b7e86f3
fix undefined variable 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
88af430380
linting (sanity) 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
08b7842001
cut newlines added by accident 2023-10-11 16:51:47 +02:00
Laurent Indermuehle
29b6ad89a1
add back all the tests steps disabled during development 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
b3b7868079
document changelog 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
0c17778f63
document better description 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
2ea7120f2e
document output form 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
2acc3d2a77
document what's missing from the output 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
487036e2ff
add set to work no matter the order 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
42224f3eee
add the wait for container to be ready back to prevent connection issue 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
270217aa30
fix recreate user tasks using correct auth options 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
5dd0321607
add filter to return an auth key when not empty 2023-10-11 16:51:46 +02:00
Laurent Indermuehle
fcb2d49b24
Add test users for MySQL auth plugins (sha256 and cache_sha2) 2023-10-11 16:51:45 +02:00
Laurent Indermuehle
83ad999038
document returned value 2023-10-11 16:51:45 +02:00