Hi,
I''m following
http://reductivelabs.com/trac/puppet/wiki/PluginsInModules in order to
use a custom fact.
My modules looks like:
# ls manifests/modules/network/
manifests plugins
# ls manifests/modules/network/plugins/facter/primaryint.rb
manifests/modules/network/plugins/facter/primaryint.rb
as is said in doc.
Then:
Turn on pluginsync and specify factpath, so that the facts dropped by pluginsync
are loaded by Puppet:
[main]
pluginsync = true
factpath = $vardir/lib/facter
as it does not say if it''s talking about master/client, I''ve
set vars in
both hosts:
Master/client:
# grep . /etc/puppet/puppet.conf|grep -v "#"
[main]
vardir = /var/lib/puppet
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
pluginsync = true
factpath = $vardir/lib/facter
[puppetd]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
Then I restart master and client but I can''t see my own fact:
[root@td234 ~]# facter primaryint
[root@td234 ~]#
it''s copied in client /var/lib/puppet/lib/facter/primaryint.rb
But, if I export RUBYLIB to /var/lib/puppet/lib/, facter sees it:
[root@td234 puppet]# export RUBYLIB=/var/lib/puppet/lib/
[root@td234 puppet]# facter primaryint
eth0
So, am I missing any conf step? any other variable is needed?
# rpm -qa|grep puppet
puppet-0.24.5-1.el4.x86_64
TIA,
Arnau
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Mark Drayton
2008-Dec-01 22:19 UTC
[Puppet Users] Re: configuring puppet to run custom facts
Hi On Dec 1, 10:14 am, Arnau Bria <arnaub...@pic.es> wrote:> Then I restart master and client but I can''t see my own fact: > > [root@td234 ~]# facter primaryint > [root@td234 ~]# > > it''s copied in client /var/lib/puppet/lib/facter/primaryint.rb > > But, if I export RUBYLIB to /var/lib/puppet/lib/, facter sees it: > [root@td234 puppet]# export RUBYLIB=/var/lib/puppet/lib/ > [root@td234 puppet]# facter primaryint > eth0That''s correct. When you run facter on the command line it doesn''t include facts in Puppet''s factpath. I use Puppet to export the following to all hosts so command-line facter picks up my facts: [root@mgt303 ~]# cat /etc/profile.d/facter.sh export FACTERLIB=/var/lib/puppet/facts [root@mgt303 ~]# facter serial_tty # a custom fact serial_tty => ttyS1 Have you tried using $primaryint in a Puppet manifest? Mark --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Arnau Bria
2008-Dec-01 22:39 UTC
[Puppet Users] Re: configuring puppet to run custom facts
On Mon, 1 Dec 2008 14:19:19 -0800 (PST) Mark Drayton wrote:> > HiHi Mark,> That''s correct. When you run facter on the command line it doesn''t > include facts in Puppet''s factpath. I use Puppet to export the > following to all hosts so command-line facter picks up my facts: > > [root@mgt303 ~]# cat /etc/profile.d/facter.sh > export FACTERLIB=/var/lib/puppet/facts > [root@mgt303 ~]# facter serial_tty # a custom fact > serial_tty => ttyS1 > > Have you tried using $primaryint in a Puppet manifest?Nop, I didn''t... I, wrongly, supposed facter had to shows custom facts... I''ll try tomorrow. Thanks a lot.> MarkArnau --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---