-
Notifications
You must be signed in to change notification settings - Fork 92
mysql_role: new module #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mysql_role: new module #189
Conversation
Codecov Report
@@ Coverage Diff @@
## main #189 +/- ##
==========================================
+ Coverage 76.92% 77.51% +0.58%
==========================================
Files 20 24 +4
Lines 1794 2161 +367
Branches 439 508 +69
==========================================
+ Hits 1380 1675 +295
- Misses 268 319 +51
- Partials 146 167 +21
Continue to review full report at Codecov.
|
Ready for review (I updated the description, there are important information, please take a look at it first) |
I updated README. Hey, folks, Friday is a good day for reviewing |
I hope we'll get more reviews here. I'm gonna merge this anyway in a week or two and release a prerelease so that this won't be included in Ansible package but interested users will be able to download it via |
* 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 ce2b269)
* 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 ce2b269)
community.mysql 2.2.0-a1 has been released and available to install via galaxy or directly from https://galaxy.ansible.com/community/mysql. It contains the |
This was introduced in ansible-collections#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.
This was introduced in ansible-collections#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.
This was introduced in ansible-collections#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.
SUMMARY
Fixes #50
mysql_role: new module
Not sure if I'm able to finish this (I'll put it explicitly if not). Hope it'll help anyway (i.e. to define an interface, etc.)
IMPORTANT
mysql_user
module to theuser
library.user_mod
function I added a couple of conditions related to roles, look for therole
variable to find those places.maria_role
acrossplugins/module_utils/user.py
(review it carefully).user_mode
function and it always reportschanged=True
whenappend_privs=yes
. I wonder if it's expected behavior for themysql_user
module? (UPDATE: yes, this is the same there, checked, I'll create an issue to fix the bug alter this gets merged to avoid conflicts)mysql_user
module to add a user to roles via a new option (called, say,roles:
).ISSUE TYPE
COMPONENT NAME
mysql_role