Getting Puppet module version

15 views
Skip to first unread message

Pablo Baeyens

unread,
May 25, 2020, 10:24:26 PM5/25/20
to Puppet Users
Hi,

I want to get the version of a module (as it appears in metadata.json) to use inside the Puppet module.
Is there any variable/fact/function with which I can do this easily?

A previous question on ask.puppet.com suggests just accessing and parsing the json file, but I would like to avoid that if possible.

Thank you in advance,
Yours,
Pablo 

Tim Meusel

unread,
May 26, 2020, 2:03:36 AM5/26/20
to Puppet Users
Hi,
puppetlabs-stdlib has a function to parse the metadata: https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/REFERENCE.md#load_module_metadata

cheers, Tim

Pablo Baeyens

unread,
May 26, 2020, 11:50:52 AM5/26/20
to puppet...@googlegroups.com
Just what I was looking for, thank you!

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/9040d7bd-8718-41d0-ad6b-06ec5d88bda4%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages