Hi,
I have created a few modules with the puppet-module generate function and I
wanted to know how I can use some of the module''s json features to get
metadata information from the module.
Is there an api to get this module info?
"puppet-module generate cosman-test" creates the following directory
contents:
-rw-r--r-- 1 cosman2001 cosman2001 223 Jun 1 11:17 Modulefile
-rw-r--r-- 1 cosman2001 cosman2001 31 Jun 1 11:17 README
drwxr-xr-x 3 cosman2001 cosman2001 102 Jun 1 11:17 files
drwxr-xr-x 4 cosman2001 cosman2001 136 Jun 1 11:17 lib
drwxr-xr-x 4 cosman2001 cosman2001 136 Jun 1 11:17 manifests
-rw-r--r-- 1 cosman2001 cosman2001 602 Jun 1 11:17 metadata.json
drwxr-xr-x 6 cosman2001 cosman2001 204 Jun 1 11:17 spec
drwxr-xr-x 3 cosman2001 cosman2001 102 Jun 1 11:17 templates
drwxr-xr-x 3 cosman2001 cosman2001 102 Jun 1 11:17 tests
Inside the Modulefile:
powerbeast:cosman-test cosman2001$ cat Modulefile
name ''cosman-test''
version ''0.0.1''
source ''UNKNOWN''
author ''cosman''
license ''UNKNOWN''
summary ''UNKNOWN''
description ''UNKNOWN''
project_page ''UNKNOWN''
## Add dependencies, if any:
# dependency ''username/name'', ''>= 1.2.0''
Inside the metadata.json file:
powerbeast:cosman-test cosman2001$ more metadata.json
/*
+-----------------------------------------------------------------------+
| |
| ==> DO NOT EDIT THIS FILE! <== |
| |
| You should edit the `Modulefile` and run `puppet-module build` |
| to generate the `metadata.json` file for your releases. |
| |
+-----------------------------------------------------------------------+
*/
{}
After "building" the module (puppet-module build modulepath)
metadata.json now looks like this:
powerbeast:cosman-test-0.0.1 cosman2001$ more metadata.json
{
"description": "UNKNOWN",
"types": [
],
"summary": "UNKNOWN",
"license": "UNKNOWN",
"checksums": {
"spec/spec_helper.rb":
"ca19ec4f451ebc7fdb035b52eae6e909",
"lib/puppet/type/README.markdown":
"34b8c80ba8683afca99f2d28ca7e70b2",
"spec/unit/puppet/provider/README.markdown":
"e52668944ee6af2fb5d5b9e798342645",
"files/README.markdown":
"3d44458cc68d8513b51e3b56c604eec4",
"lib/puppet/provider/README.markdown":
"3835801d7626dd8d541c4fdf7ca9f3e4",
"lib/puppet/parser/functions/README.markdown":
"e596ce938864a80fd1e51640cca7f612",
"README": "dee827ceab754b7617701b18a795db1e",
"manifests/README.markdown":
"b9970454391883e36b55137328792a55",
"tests/init.pp": "f9b848a7b81e872ff915cf7beb236ec1",
"templates/README.markdown":
"aada0a1952329e46b98695349dba6203",
"spec/README.markdown":
"32a1fc0121c28aff554ef5d422b8b51e",
"lib/facter/README.markdown":
"145e26334b4d80e48e9e55ba78800579",
"spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c",
"metadata.json": "d34d0b70aba36510fbc2df4e667479ef",
"spec/unit/puppet/type/README.markdown":
"de26a7643813abd6c2e7e28071b1ef94",
"Modulefile": "176fcfdeda0b1c5f60043671520d91b1",
"manifests/init.pp": "4fdf6c37a67ef6473529390df3c66cbf"
},
"source": "UNKNOWN",
"version": "0.0.1",
"dependencies": [
],
"name": "cosman-test",
"author": "cosman",
"project_page": "UNKNOWN"
}
Now how would I get this wonderful metadata? Does an API exist or do I need to
create something?
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.