How to create a dependency on a puppetlabs/mysql binding
I have a module containing a resource (of type exec, to run an installer) which has a dependency on the python bindings for MySQL.
I'm using the latest PuppetLabs MySQL module and struggling to figure out how to create this dependency. I can use the anchor pattern (or 'contains') to create a dependency on ::mysql::bindings, however that class doesn't have a dependency on the individual language bindings (which are marked as 'private' classes) and so there's nothing to stop puppet applying the resources for the binding after the installer has attempted to run. At the moment I can only think of two options which don't involve modifying the MySQL module:
- stop using ::mysql::bindings and manage the language bindings for python manually (which defeats the point of using a third-party module); or
- create a dependency directly on the private ::mysql::bindings::python class (which is not ideal as I shouldn't have to know about the 'internals' of a third-party module, especially if the class I'm depending upon is private).
The other option is to modify the ::mysql::bindings class to create a harder dependency on the individual bindings (and potentially submit a PR).
Is there something that I'm missing here? How should I be creating this dependency? Is there a way to create this dependency using the existing module and functionality or am I going to have to do something nasty or modify the third-party module?