-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This might just do it.
I feel like I tried this and it didn't work but I'll give it another shot. Thanks! Trevor On 11/22/2011 03:10 AM, Dan Bode wrote: > You could use the resource_type indirection to query all of the resource > types and select the ones of type node. > > This will only query the nodes that were specified in manifests (which is > quite different from all of the nodes that have checked in) > > Below is some example code: > > require "puppet/face" > Puppet::Face[:resource_type,:current].search("*").find_all {|x| x.type == > :node }.collect {|y| y.name } > > On Mon, Nov 21, 2011 at 4:43 PM, Trevor Vaughan <tvaug...@onyxpoint.com>wrote: > > Thanks for the suggestions guys but I'm giving this one up as too annoying > to bother. > > The issue was to detect the nodes that hadn't checked in but were defined > in the manifest. > > Getting the information out of the YAML is pretty easy, yes. > > Thanks! > > Trevor > > On 11/21/2011 12:10 PM, Brian Gallew wrote: >>>> This is (almost) trivial. >>>> First, create a fact that turns /var/lib/puppet/state/classes.txt into > an array. Then extract that fact from the storedconfigs DB > programmatically. Admittedly, this won't get all defined nodes, as that is > somewhat meaningless since nodes can be "default" or regular exceptions. > Instead, this gets all nodes that have run Puppet at least once. >>>> >>>> On Nov 20, 2011, at 6:04 PM, James Turnbull wrote: >>>> >>>>> Trevor Vaughan wrote: >>>>>> Sorry but...bump? >>>>>> >>>>>> On 11/18/2011 02:20 PM, Trevor Vaughan wrote: >>>>>>> Sorry if this is a double post, my e-mail glitched on me. >>>>>> >>>>>>> Anyway, I'm trying to write a Ruby script that can get all defined >>>>>>> nodes and all classes assigned to those nodes. I would prefer to not >>>>>>> have to compile a catalog for each node. >>>>>> >>>>>>> I tried looking through the puppet/util/rdoc material but it really >>>>>>> didn't handle the node entries as far as I could tell and also didn't >>>>>>> seem to have a way to get the info without printing it all out. >>>>>> >>>>> >>>>> Sorry missed this one - I do something vaguely similar for the Puppet >>>>> Rundeck integration - have a look at the code at: >>>>> >>>>> https://github.com/jamtur01/puppet-rundeck >>>>> >>>>> Others may be able to chime in with better ideas. >>>>> >>>>> James >>>>> >>>>> -- >>>>> James Turnbull >>>>> Puppet Labs >>>>> 1-503-734-8571 >>>>> To schedule a meeting with me: http://tungle.me/jamtur01 >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google > Groups "Puppet Users" group. >>>>> To post to this group, send email to puppet-us...@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. >>>>> >>>> > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Developers" group. >> To post to this group, send email to puppet-dev@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-dev+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-dev?hl=en. >> >> > - -- Trevor Vaughan Vice President, Onyx Point, Inc. email: tvaug...@onyxpoint.com phone: 410-541-ONYX (6699) pgp: 0x6C701E94 - -- This account not approved for unencrypted sensitive information -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJOy4oxAAoJECNCGV1OLcypgFUH/ifi2rSHfrllr+I1fAB2/zYl W7RTjeq/dOKRTX3tCx+nmE6WWsVdd9GCKyaVtQ+cP2BP1/hs0QSp/JWsJgigTKef EVnrbfE0LQq/jZw/RF3n3cdJbS91iHy0n7Oy7rY+WlxpwlmSJlOIl8TqLI9oGjEu W0T/s1fYtBQ5/Y5RLmT5/zR94/dPV47uYfhrqm0HjAFZPd5M0jRirIK86Vb7nY8n nWBflJFaYLHSgf2rHjlFRW2HR9gX2USUAWywnsywRYkIDAauWgb+nbsLbn2Qj/hO evReqy0qaAOGoGuvC/C+Gof6HqrcpHL06bMb0vu8niGkHLrp3W+zHSNG7EbRILw= =4wFc -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
<<attachment: tvaughan.vcf>>