int he example below I run facter looking for the fact "sp_serial_number". as you can see, the command facter sp_serial_number returns nothing, but the fact is there and is returned when just running facter and grepping for the fact. Some fact seem to work and others do not. any ideas? marcuspro:~ allan$ facter --version 1.5.7 marcuspro:~ allan$ facter sp_serial_number marcuspro:~ allan$ facter | grep sp_serial_number sp_serial_number => H09353BY20H marcuspro:~ allan$ facter timezone MST --- Thanks, Allan Marcus 505-667-5666 -- 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 Fri, Jan 22, 2010 at 11:18 AM, Allan Marcus <allan@lanl.gov> wrote:> int he example below I run facter looking for the fact "sp_serial_number". > as you can see, the command facter sp_serial_number returns nothing, but the > fact is there and is returned when just running facter and grepping for the > fact. > > Some fact seem to work and others do not. any ideas? >The current version of facter only works in this way with static facts that don''t rely on other facts. Dynamic facts like the sp_* ones don''t work. I believe Paul has a fix for this for the next version.> > marcuspro:~ allan$ facter --version > 1.5.7 > marcuspro:~ allan$ facter sp_serial_number > marcuspro:~ allan$ facter | grep sp_serial_number > sp_serial_number => H09353BY20H > marcuspro:~ allan$ facter timezone > MST > > > > --- > Thanks, > > Allan Marcus > 505-667-5666 > > > > -- > 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.
On Fri, Jan 22, 2010 at 11:23 AM, Nigel Kersten <nigelk@google.com> wrote:> > > On Fri, Jan 22, 2010 at 11:18 AM, Allan Marcus <allan@lanl.gov> wrote: > >> int he example below I run facter looking for the fact "sp_serial_number". >> as you can see, the command facter sp_serial_number returns nothing, but the >> fact is there and is returned when just running facter and grepping for the >> fact. >> >> Some fact seem to work and others do not. any ideas? >> > > The current version of facter only works in this way with static facts that > don''t rely on other facts. Dynamic facts like the sp_* ones don''t work. > > I believe Paul has a fix for this for the next version. >btw, for cases where you need this, you can simulate it with a simple ruby script that I like better than using grep. #!/usr/bin/ruby require ''facter'' Facter.loadfacts value = Facter.value(ARGV[0]) puts value unless value.nil?> > > >> >> marcuspro:~ allan$ facter --version >> 1.5.7 >> marcuspro:~ allan$ facter sp_serial_number >> marcuspro:~ allan$ facter | grep sp_serial_number >> sp_serial_number => H09353BY20H >> marcuspro:~ allan$ facter timezone >> MST >> >> >> >> --- >> Thanks, >> >> Allan Marcus >> 505-667-5666 >> >> >> >> -- >> 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 >-- 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.
Nigel Kersten <nigelk@google.com> writes:> On Fri, Jan 22, 2010 at 11:18 AM, Allan Marcus <allan@lanl.gov> wrote: > >> int he example below I run facter looking for the fact "sp_serial_number". >> as you can see, the command facter sp_serial_number returns nothing, but the >> fact is there and is returned when just running facter and grepping for the >> fact. >> >> Some fact seem to work and others do not. any ideas? >> > > The current version of facter only works in this way with static facts that > don''t rely on other facts. Dynamic facts like the sp_* ones don''t work. > > I believe Paul has a fix for this for the next version.Also see ''fctr'' from this blog entry which does it: http://www.devco.net/archives/2010/01/14/better_way_to_query_facts.php -- 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 Fri, Jan 22, 2010 at 11:28 AM, Mark Plaksin <happy@usg.edu> wrote:> Nigel Kersten <nigelk@google.com> writes: > > > On Fri, Jan 22, 2010 at 11:18 AM, Allan Marcus <allan@lanl.gov> wrote: > > > >> int he example below I run facter looking for the fact > "sp_serial_number". > >> as you can see, the command facter sp_serial_number returns nothing, but > the > >> fact is there and is returned when just running facter and grepping for > the > >> fact. > >> > >> Some fact seem to work and others do not. any ideas? > >> > > > > The current version of facter only works in this way with static facts > that > > don''t rely on other facts. Dynamic facts like the sp_* ones don''t work. > > > > I believe Paul has a fix for this for the next version. > > Also see ''fctr'' from this blog entry which does it: > http://www.devco.net/archives/2010/01/14/better_way_to_query_facts.phpyeah, that''s better than the snippet I just posted :) -- 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.