summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorDavid Schmitt <david.schmitt@puppetlabs.com>2015-10-15 09:44:12 +0100
committerDavid Schmitt <david.schmitt@puppetlabs.com>2015-10-15 09:44:12 +0100
commit57a8485223c221aa075d09c0a7de816a26daf1b0 (patch)
tree556730758a11a2e2d42a60d43e553b7abcdf5c4c /README.markdown
parent5b3c623394e405ca0db5e707554a91b4252bbbad (diff)
parent25410c4598d3c0029fcd05adc2e305dbf5f8d902 (diff)
downloadpuppet-stdlib-57a8485223c221aa075d09c0a7de816a26daf1b0.tar.gz
puppet-stdlib-57a8485223c221aa075d09c0a7de816a26daf1b0.tar.bz2
Merge pull request #537 from cmurphy/fix_load_module_metadata
Fix load module metadata
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown9
1 files changed, 9 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index b6f586e..d86d91f 100644
--- a/README.markdown
+++ b/README.markdown
@@ -539,6 +539,15 @@ Loads the metadata.json of a target module. Can be used to determine module vers
notify { $metadata['author']: }
~~~
+If you do not want to fail the catalog compilation if the metadata file for a module is not present:
+
+ ~~~
+ $metadata = load_module_metadata('mysql', true)
+ if empty($metadata) {
+ notify { "This module does not have a metadata.json file.": }
+ }
+ ~~~
+
*Type*: rvalue.
#### `lstrip`