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?? -Andrew -- 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.
On Thu, Aug 11, 2011 at 2:32 PM, Andrew Thompson <netengr2009@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? 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Don''t know exactly what you are looking for, but you may be interested in http://cloudsmith.github.com/geppetto/ which is tooling for puppet development - editor with syntax coloring, cross-reference checking, module-dependency checking, etc. As Geppetto contains its own parser that creates a model of puppet (and modules) it is possible to answer all sorts of questions about a configuration. Maybe some of what you are looking for is already there, or could be easily added (I am all ears for suggestions - not to mention happy about contributions). Regards - henrik On 8/11/11 9:32 PM, Andrew Thompson 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?? > > -Andrew >-- 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.
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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> > > 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
2011/8/14 Jérôme Loyet <jerome@loyet.net>> > > > 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. > > imho thats the wrong way of doing it..I think that each class should extract somehow (metadata, rdoc style etc) the variables that should/could be manipulated externally. including their types, etc, this would simplify external interfaces with puppet and allow to create complex web forms to support the underlining puppet manifests. FYI, it is in our foreman roadmap, so if it fits, you might not want to reinvent the wheel. Ohad> 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+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- 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.