The function {{find_modulemodule_directory}} has been added - it finds a module by name and returns the file system path to its root directory, or {{undef}} if module is not found on the modulepath.
Add a function {{find_modulemodule_directory(names)}} that returns the path of the first found module on the module path, or undef if none of the given names is a module on the modulepath.
ORIGINAL ---- It would be very useful for calling generator scripts in the files directory of the current module if the path to the current module (in particular which of the entries in module_path is currently used) would be supplied as a compiler variable similar to module_name.
Currently it is only possible to hard-code that component of the path as far as I can tell, e.g.
This works fine for most cases but we are currently using several folders in the environment.conf's module_path, one for local modules that abstract away stuff for specific hosts, one for shared modules between different customer's puppet masters and our own and now one for shared modules between our old and new environments (rewrite of our internal modules to support multiple Linux distributions and follow more best practices but not all hosts are migrated to it yet).