[Puppet Users] Re: Parse Puppet Manifests

2011-08-14 Thread Jérôme Loyet
   I am looking for a method to parse the entire set of puppet manifests/
   modules.  For example I want to see a list of all packages that I am
   managing with puppet.  I have seen the compile option, but this only
   gives me a particular node's point of view.  While I could just scrape
   all of the manifest files for this information with grep, etc., there
   must be something in the puppet code base I could plug into??

Hi,

I'm looking for the exact same thing. I'm developping a RAILS
application which will have to parse an entire environment for
classes, modules and variables. This application will then ask the
user to map a node to classes and set parameters. All this
configuration will then be saved to a database in order to be read
from the puppet node classifier.

I'm sure there everything in the puppet code (in ruby) to achieve this
but I didn't find it yet. If someone can point me somehting usefull,
it would be great.

thx

++ Jerome

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Parse Puppet Manifests

2011-08-12 Thread Andrew Thompson


On Aug 11, 3:48 pm, Nan Liu n...@puppetlabs.com wrote:
 On Thu, Aug 11, 2011 at 2:32 PM, Andrew Thompson netengr2...@gmail.com 
 wrote:
  I am looking for a method to parse the entire set of puppet manifests/
  modules.  For example I want to see a list of all packages that I am
  managing with puppet.  I have seen the compile option, but this only
  gives me a particular node's point of view.  While I could just scrape
  all of the manifest files for this information with grep, etc., there
  must be something in the puppet code base I could plug into??

 I'm not aware how you can obtain this without compiling and obtaining
 the catalog for a target node. For example, there's no easy way of
 determining what package the following manifests controls without
 knowing $package_list (which could be from an external source, such as
 extlookup, enc):

 package { $package_list:
   ensure = latest,

 }

 The client's catalog can be examined and aggregated to review what's
 managed on all your target systems. Also what's the interest of
 knowing some package X is in the puppet manifests if it's never used
 on any system? I guess the question is what's your goal?

In this particular example I am interested in the list of packages
that I am managing with puppet so that I can build a custom package
mirror with those packages.

 Thanks,

 Nan

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.