summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/load_module_metadata.rb
AgeCommit message (Collapse)Author
2015-10-14Let load_module_metadata succeed on empty fileColleen Murphy
Some modules or module versions don't have a metadata.json file, but we might still want to use the load_module_metadata function on them. The lack of a file can still give us important information. For example, it might tell us that the version of the module installed is "very old" even if we can't read the version number directly. This patch adds a parameter to let the user specify if an empty file is acceptable. To preserve backwards compatibility it does not change the current default behavior, which is to raise an error if metadata.json does not exist.
2015-07-30Add load_metadata_json functionSpencer Krum
This function loads the metadata.json into a puppet variable. This enables a number of neat things such as: * Which version of the module am I using? 2.x? 3.x? * Which author of the module am I using? puppetlabs? example42?