-
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
mysql_user: support IDENTIFIED VIA/WITH #6
Comments
Hello, Maybe this feature is already implemented, isn't it ? See documentation here and code here. This example works for me : - name: support IDENTIFIED VIA/WITH
community.mysql.mysql_user:
name: telegraf
priv: "*.*:USAGE"
plugin: unix_socket
login_unix_socket: /var/run/mysqld/mysqld.sock Result :
|
IIRC a leftover was that only |
@drzraf can you provide the versions that support each idiom? |
About supporting both: I believe MySQL still doesn't support |
Hello create user user@host IDENTIFIED WITH/VIA pam USING 'pam_service_name'; In a task like: works, but then all pam modules regarding account/auth are questioned. So I would like to have a plugin_using: option in mysql_user which allows to specify options to plugins. Regards |
I have been hitting this exact issue, there is no way I can see to specify the using service name. |
Hello create user user@host IDENTIFIED WITH/VIA pam USING 'pam_service_name'; I looked in modules/mysql_user.py and module_utils/user.py, and added an option for such a string. I tested it against a mariadb 10.5 with audit plugin installed so I can see what ansible does: root,localhost,218,3822,QUERY,mysql,'CREATE USER 'user1'@'localhost' IDENTIFIED WITH 'pam' USING 'pam_mysql' REQUIRE SSL',0 So my changes seems to work. I will try a push request, but that was a bit of a hassle last time :-) |
Pull Request: deleted This may need a lot more changes to the parts that check existing user ... as mariadb stores the information about the "using" part in and mysql and mariadb differ in Syntax, I made a new PR #445. the changes are even smaller because I use the "plugin_auth_string" and check for the plugin used to do the "using" part only for pam as the code issues But from this point on (last time 2/3 of the tests failed, which I assume for this changes also) I need help :-) |
Hello again but I think it is better to test wether mariadb or mysql is used and follow different code path accordingly. |
Hello again
That is this code:
Any chance to build this into mysql.user? |
@hubiongithub hello, would you like to submit a PR? here's a quick-start guide. Apologies for not replying here -i don't use it- but would be happy to take a look at the PR |
@hubiongithub i don't see any difference with the first query, so, instead of adding the lines, i would just change the first
|
@hubiongithub last chance for you to pick it up ^, otherwise i'll put the |
added myself #619, fyi |
not sure it #619 solved the issue but closing. Feel free to re-open or create another one instead. thanks everyone! |
Hello Line 214-216 in v3.10.0 probably need a change analog to your change #619
As there is no reopen button for me, and its more complicated, I will open a new issue |
@hubiongithub thanks for reporting! Here's the PR |
Copied from ansible-collections/community.general#170
Initially reported by @drzraf
SUMMARY
Support user
IDENTIFIED VIA
/IDENTIFIER WITH
(egunix_socket
is one such options)ISSUE TYPE
COMPONENT NAME
mysql_user
ADDITIONAL INFORMATION
The text was updated successfully, but these errors were encountered: