| When a catalog is compiled it will get a "version" that contains a value that determined by the "config_version" setting. By default this is a timestamp, but can be the result of some external script. https://puppet.com/docs/puppetdb/6.3/api/wire_format/catalog_format_v8.html#version-1 https://puppet.com/docs/puppet/latest/configuration.html#configversion It would be trivial to write a function that returns the "version" of the catalog being compiled. The (4x API) function would evaluate the line of logic below to pick up the version. A function like that can be placed in a module and does not have to be in puppet. It will depend on the internal APIs of scope (getting the catalog), and catalog (getting the version) - but those APIs are not likely to change.
closure_scope.catalog.version
|
|