Gary Larizza
2010-Jun-08 14:20 UTC
[Puppet Users] Passing different facts to external node classifier scripts
Is there a way to pass something other than the certname fact that is being passed to an external node classifier script? I''m looking through puppet/indirector/exec.rb and puppet/indirector/node/exec.rb but am not seeing a way to change the information passed. If this isn''t possible, is there a way that Facter data can be accessible to an external node classifier? I''m looking to clean up the way we assign classes to nodes, and am hoping I can utilize Facter data to use this. Thanks! -- Gary Larizza -- 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.
Nigel Kersten
2010-Jun-08 14:50 UTC
Re: [Puppet Users] Passing different facts to external node classifier scripts
On Tue, Jun 8, 2010 at 7:20 AM, Gary Larizza <ccshots@gmail.com> wrote:> Is there a way to pass something other than the certname fact that is being > passed to an external node classifier script? I''m looking through > puppet/indirector/exec.rb and puppet/indirector/node/exec.rb but am not > seeing a way to change the information passed. > > If this isn''t possible, is there a way that Facter data can be accessible > to an external node classifier? I''m looking to clean up the way we assign > classes to nodes, and am hoping I can utilize Facter data to use this. > Thanks! >We had a chat about this on the list relatively recently. The server actually writes out the client fact data *before* the external node provider gets invoked, so you can poke into the fact store on the server, assuming that the facts you want are available at that point. There should be an easier first class method for working this out, but it''s certainly doable now.> -- > Gary Larizza > > -- > 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<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- nigel -- 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.
Gary Larizza
2010-Jun-09 12:02 UTC
Re: [Puppet Users] Passing different facts to external node classifier scripts
On Tue, Jun 8, 2010 at 10:50 AM, Nigel Kersten <nigelk@google.com> wrote:> > > > We had a chat about this on the list relatively recently. > > The server actually writes out the client fact data *before* the external > node provider gets invoked, so you can poke into the fact store on the > server, assuming that the facts you want are available at that point. >So, do you mean actually grabbing the data from the server''s $VARDIR/yaml/facts/ directory, or by actually referencing Facter variables from the external node classifier script? I''m guessing the former, by your response. I vaguely remember a thread where Nigel was shocked by the order that facter and external nodes were called - but I can''t seem to find it yet. I''ll dig through the archives to see if I can find this...> > There should be an easier first class method for working this out, but it''s > certainly doable now. > > >> -- >> Gary Larizza >> >> -- >> 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<puppet-users%2Bunsubscribe@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > > > -- > nigel > > -- > 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<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- Gary Larizza Director of Technology Huron City Schools http://www.huronhs.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.
Gary Larizza
2010-Jun-09 12:11 UTC
Re: [Puppet Users] Passing different facts to external node classifier scripts
FYI - Found that thread: http://groups.google.com/group/puppet-users/browse_thread/thread/28c7b30874bb792c/dca3587668d50f9e?hl=en&lnk=gst&q=external+nodes#dca3587668d50f9e Sorry that this was a rehashing of it - but I agree that this process should be listed in the docs. I''ll look into what needs to be done to checkout the docs source or updating the wiki. On Wed, Jun 9, 2010 at 8:02 AM, Gary Larizza <ccshots@gmail.com> wrote:> > > On Tue, Jun 8, 2010 at 10:50 AM, Nigel Kersten <nigelk@google.com> wrote: > >> >> >> >> We had a chat about this on the list relatively recently. >> >> The server actually writes out the client fact data *before* the external >> node provider gets invoked, so you can poke into the fact store on the >> server, assuming that the facts you want are available at that point. >> > > So, do you mean actually grabbing the data from the server''s > $VARDIR/yaml/facts/ directory, or by actually referencing Facter variables > from the external node classifier script? I''m guessing the former, by your > response. > > I vaguely remember a thread where Nigel was shocked by the order that > facter and external nodes were called - but I can''t seem to find it yet. > I''ll dig through the archives to see if I can find this... > > > >> >> There should be an easier first class method for working this out, but >> it''s certainly doable now. >> >> >>> -- >>> Gary Larizza >>> >>> -- >>> 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<puppet-users%2Bunsubscribe@googlegroups.com> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/puppet-users?hl=en. >>> >> >> >> >> -- >> nigel >> >> -- >> 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<puppet-users%2Bunsubscribe@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > > > -- > Gary Larizza > > Director of Technology > Huron City Schools > http://www.huronhs.com > > 悟 >-- Gary Larizza Director of Technology Huron City Schools http://www.huronhs.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.