llowder@oreillyauto.com
2012-Jun-29 20:05 UTC
[Puppet Users] Ruby custom fact question/problem
I originally started this post to ask about one problem, but in the process of getting the question written I learned that it was due to differences between 1.8.7 and 1.9.2 that had caused my problem, so I got that fixed. I now have the fact successfully loading when I run puppet: info: Loading facts in /var/lib/puppet/lib/facter/node_id.rb However, when I run facter, I can''t find node_id. facter | grep node No LSB modules are available. Is there another step I am missing? Also, one thing I didn''t understand (and so may have done wrong) is how the actual fact gets set. Is it simply the last variable/string used in the code? Thanks. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/nRd4lsLLKd0J. 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, Jun 29, 2012 at 1:05 PM, llowder@oreillyauto.com <llowder@oreillyauto.com> wrote:> I originally started this post to ask about one problem, but in the process > of getting the question written I learned that it was due to differences > between 1.8.7 and 1.9.2 that had caused my problem, so I got that fixed. > > I now have the fact successfully loading when I run puppet: > > info: Loading facts in /var/lib/puppet/lib/facter/node_id.rb > > However, when I run facter, I can''t find node_id. > > facter | grep node > No LSB modules are available.You need to tell Facter to load the puppet facts like: facter -p | grep node or just facter -p node_id> > Is there another step I am missing? Also, one thing I didn''t understand (and > so may have done wrong) is how the actual fact gets set. Is it simply the > last variable/string used in the code?Yep.> > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/nRd4lsLLKd0J. > 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 | http://puppetlabs.com | @nigelkersten Schedule Meetings at: http://tungle.me/nigelkersten -- 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.
----- Original Message -----> From: llowder@oreillyauto.com > To: puppet-users@googlegroups.com > Sent: Friday, June 29, 2012 9:05:53 PM > Subject: [Puppet Users] Ruby custom fact question/problem > > I originally started this post to ask about one problem, but in the > process of getting the question written I learned that it was due to > differences between 1.8.7 and 1.9.2 that had caused my problem, so I > got that fixed. > > I now have the fact successfully loading when I run puppet: > > info: Loading facts in /var/lib/puppet/lib/facter/node_id.rb > > However, when I run facter, I can''t find node_id. > > facter | grep node > No LSB modules are available. > > > Is there another step I am missing? Also, one thing I didn''t > understand (and so may have done wrong) is how the actual fact gets > set. Is it simply the last variable/string used in the code? >You have to pass -p or --puppet to facter on the cli to make it aware of facts copied out using puppet pluginsync -- 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.
llowder@oreillyauto.com
2012-Jun-29 20:38 UTC
Re: [Puppet Users] Ruby custom fact question/problem
Comments inline On Friday, June 29, 2012 3:13:18 PM UTC-5, R.I. Pienaar wrote:> > > > ----- Original Message ----- > > > Sent: Friday, June 29, 2012 9:05:53 PM > > Subject: [Puppet Users] Ruby custom fact question/problem > > > > I originally started this post to ask about one problem, but in the > > process of getting the question written I learned that it was due to > > differences between 1.8.7 and 1.9.2 that had caused my problem, so I > > got that fixed. > > > > I now have the fact successfully loading when I run puppet: > > > > info: Loading facts in /var/lib/puppet/lib/facter/node_id.rb > > > > However, when I run facter, I can''t find node_id. > > > > facter | grep node > > No LSB modules are available. > > > > > > Is there another step I am missing? Also, one thing I didn''t > > understand (and so may have done wrong) is how the actual fact gets > > set. Is it simply the last variable/string used in the code? > > > > You have to pass -p or --puppet to facter on the cli to make it > aware of facts copied out using puppet pluginsync >In this case... also had to use sudo, but that may just be due to the permissions on /var/lib/puppet. But I can see that it is working now, and is working as expected. Thanks all. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/WJB4Q3ItKZIJ. 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.