-
Notifications
You must be signed in to change notification settings - Fork 88
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
MariaDB, parsing roles failed. #231
Comments
Hard to implement, as it depends on the mariadb version used. pymysql fails if mariadb version < 10.3 Edit: |
As far as I remember this also happened with older version of this collection. (cant verify at the moment on my machine as I get an error when trying to install a collection) |
@the02 ok, thanks for the feedback! I'll create an issue to add mariadb to our CI first. This feels like a right thing to start with. |
Hello
It seems that roles granted to the users have the format "grant rolename@'%' to user...." tested with community.mysql 3.1.2 in module_utils/user.py
the keyword "ON" is missing in the role grants, so the pattern line does not match My output looks like this:
an additional run on the output with something like this
but unsure what r"()" really does here. ansible 2.9 My dirty workaround is to remove the role, add/remove the users ans add the role, but this is not a goobd solution as the existing user get ripped of their privileges while the playbook runs. |
Thank you folks! I'm looking at this |
#341 could you please take a look? I reproduced the bug in our CI and with the changes, it doesn't appear any more. |
SUMMARY
When trying to manager a user with roles applied the user module appears to fail to parse existing grants.
ISSUE TYPE
COMPONENT NAME
mysql_user
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
OpenSuse 15.3 / MariaDB 10.6.4
STEPS TO REPRODUCE
Running a show grants for this user shows this:
EXPECTED RESULTS
roles should be parsed.
ACTUAL RESULTS
without debug:
The text was updated successfully, but these errors were encountered: