-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Added support for FUNCTION and PROCEDURE privileges to mysql_user #23223
Conversation
@mklassen code looks good, seems like a good feature to add. Can you or anyone else reading this test this against default mysql (or mariadb) installs on centos6, centos7, and w/e latest LTS ubuntu is and ensure it works / doesnt break anything existing? And then post results of test here. (Sorry for being a terrible maintainer and not reviewing this 5 months ago, or running these tests myself, honestly if anybody is itching to be the Mysql maintainer for Ansible just let me know.) |
@mklassen This PR contains |
cc @Constantin007 @Constantin07 @DJMuggs @GGabriele @MarkusTeufelberger @NickatEpic @Qalthos @Spredzy @ThePixelDeveloper @ThomasSteinbach @abirami-n @adq @aimonb @Akasurde @alikins @amuraleedhar @bennojoy @berenddeschouwer @brandond @brian-brazil @broncofan @caphrim007 @chouseknecht @clc-runner @cloudnull @cove @dagnello @dagwieers @dav1x @defionscode @devigned @dgarros @Dhivyap @dkasberg @dkhenry @dstoflet @dusdanig @emonty @erydo @ganeshrn @garethr @goozbach @gouthampacha @groks @gundalow @gunzy83 @hacosta @haroldwongms @helldorado @hulquest @ignatenkobrain @ivanbojer @j2sol @jarv @jcpowermac @jctanner @jedelman8 @jeremyschulman @jmcgill298 @joelthompson @joshuaconner @jsdalton @jsmartin @jtschichold @juliakreger @julienstroheker @jwhitbeck @kedarX @kevensen @lmazuel @lmprice @loia @lujeni @lwade @machacekondra @matburt @mattupstate @maxamillion @mcltn @mcv21 @mgruener @mgwilliams @mikewiebe @mjschultz @mkrizek @mwperina @nand0p @nerzhul @nitzmahone @obsoleted @ogenstad @ozboms @pdellaert @privateip @Qalthos @rahushen @rcarrillocruz @rickmendes @rnh556 @robinro @ryansb @s-hertel @saito-hideki @samdoran @schunduri @scicoin-project @seiffert @sgargan @shepdelacreme @shrews @skg-net @smbambling @softzilla @tedder @tgerla @thingee @tintoy @trishnaguha @tstringer @verm666 @willthames @wilvk @wimnat @xscript @yaegashi @yuwzho @zfil @zikalino |
@mklassen this PR contains more than one new module. Please submit only one new module per pullrequest. For further explanation, please read grouped module documentation |
Addresses issue #29511 |
lgtm. tested on mariadb 10.3 |
SUMMARY
Added support for FUNCTION and PROCEDURE in parsing the priv parameter of mysql_user
A privilege in priv can be prepended by
FUNCTION
orPROCEDURE
. It should be separated from the db.table portion of the privilege by a space. This was chosen as it matches the format of the privilege as extracted in privileges_get function.ISSUE TYPE
COMPONENT NAME
mysql_user
ANSIBLE VERSION
ADDITIONAL INFORMATION
Currently only
TABLE
privileges can be manipulated with mysql_userGranting execute privileges on a mysql
FUNCTION
requires an SQL statement of the formUnfortunately if the
FUNCTION
keyword is included inmysql_user
modules's priv parameter it is not recognized as a valid privilege level.Object types of
FUNCTION
andPROCEDURE
are supported by mysql (http://dev.mysql.com/doc/refman/5.7/en/grant.html) and it would be nice if the priv parameter supported specifying 'object_type', so that task like the following could be executed