Hello!
We are running a site with alot of plugins in moodle 3.6 in different enviorments (dev,qa,prod) .
Currently we are trying to, as much as possible, automate mangement of these enviroments. In this process ofcourse comes management of plugins and I am trying to easily access all versions of plugins. It should be apperently but both my short attention spam and google-fu is failing me. :\
- I have tried to use moosh to list all plugins but, as I do it, I dont get the version of the plugin.
The idea is to hold a static file with all plugins and versions that should correspond from dev => qa => prod. Then ansible goes into the enviorment and validates all these versions. if the version is correct it ignores it, but if it is wrong we install it using: moosh plugin-install -d <plugin> <version>, purging cache and so on...
f.e. moosh plugin-install -d someplugin 2019100100
This version is stored in the plugins version.php but I find the plugin structure a bit tricky. But are there some other way of obtaining this version number in an easy fashion, preferably from moosh. An alternative is to try to ape after the php script that list them in the WUI or even just parse it out from the version.php files?
As we have multiple nodes per enviroment I might not get around synchronizing the entire webdir from one node to all others(but simply making sure to run moosh plugin-install -d someplugin should solve this on all nodes )
Any tips or tricks would be greatly appreciated. And I am so sorry if the question is stupid.
edit: Sorry, quick on the question. I can ofcourse use the database and get mdl_config to get the value where name = 'version' and plugin is the plugin but still. Any other ideas?
Cheers'