Hi All, What is the right class/def to fetch the nodes data (ldap/external nodes etc) I know Puppet::Node.find.. but it returns the facts rather than the parameters and class definitions. Thanks, Ohad --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Luke Kanies
2008-Jul-17 06:40 UTC
[Puppet Users] Re: how to fetch the nodes value though ruby
On Jul 16, 2008, at 2:17 AM, Ohad Levy wrote:> Hi All, > > What is the right class/def to fetch the nodes data (ldap/external > nodes etc) > I know Puppet::Node.find.. but it returns the facts rather than the > parameters and class definitions.Node.find should return a Puppet::Node instance, which should have the parameters (including facts, if your terminus does Node#fact_merge) and classes. If it doesn''t, um, you should probably buy a lottery ticket. Or fix your terminus. -- Aizu''s Second Law: What changes the world is communication, not information. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ohad Levy
2008-Jul-18 01:45 UTC
[Puppet Users] Re: how to fetch the nodes value though ruby
yes you are right :) I missed the following lines: Puppet[:config] = "/etc/puppet/puppet.conf" Puppet.parse_config Just one thing to note if anyone else is reading it, if you execute it this way, you will get the facts of the puppetmaster and not the host you are trying to find, but in my cases I wanted the output of the external node though puppet. Thanks for your help. On Thu, Jul 17, 2008 at 2:40 PM, Luke Kanies <luke@madstop.com> wrote:> > On Jul 16, 2008, at 2:17 AM, Ohad Levy wrote: > > > Hi All, > > > > What is the right class/def to fetch the nodes data (ldap/external > > nodes etc) > > I know Puppet::Node.find.. but it returns the facts rather than the > > parameters and class definitions. > > Node.find should return a Puppet::Node instance, which should have the > parameters (including facts, if your terminus does Node#fact_merge) > and classes. > > If it doesn''t, um, you should probably buy a lottery ticket. Or fix > your terminus. > > -- > Aizu''s Second Law: > What changes the world is communication, not information. > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---