Open insanity54 opened 2 years ago
I think it was caused by the python3-pymysql package, this package seems buggy. The last commit switches to use python3-mysqldb which should have no such py issue. Feel free to give it a try and let me know if it works for you (it works in my test environment).
The commit hasn't been pushed to the public yet, it seems I need to include some must files in order to make the upload work.
Ok, pushed success
I just spun up a Ubuntu 22.04 server and tried to install Wordpress using this collection. I ran into a failure
I did some searching and I think the cause is that the root user lacks mysql privs necessary to SELECT things in the user database.
I tried modifying the mysql role to see if I could get past the error. I added,
priv: '*.*:SELECT'
to the task named, "Set MySql root password for 127.0.0.1, ::1"This seemed to do the trick, but after that, there was another error on the task named, "Create MySQL user for WordPress"
I wanted to know more about what is causing this error so I browsed the source of the mysql plugin. Turns out, it could be one of three types of errors and the code isn't designed tot tell us which error it is. It could be a ProgrammingError, OperationalError, or InternalError, but the error message will always suggest that there's something wrong with the priv string.
https://github.com/ansible-collections/community.mysql/blob/b9a6ec4f7d5c8e7293cb3f84e333d1f5fba20be8/plugins/module_utils/user.py#L728
I did a quick patch on that line to print whatever the error is
We got denied access!
I'll have to dig some more