I would like to retrieve a module's version through Puppet.
For example:
notify { "module version is $module_version": }
but this is not possible with Puppet. That's why I would like to add a custom resource or function using Ruby which can handle that.
My idea is to use Ruby to open the metadata.json, get the module's version, and add it to the facts. Do you think it's possible to open the metadata.json of the module in question? Do you have any other ideas?