Could someone please point me in the right direction to debug this ? its kinda 
weird that it does not work from within puppet but works great when running it 
by hand

Begin forwarded message:

From: Kim Gert Nielsen <[email protected]<mailto:[email protected]>>
Date: December 29, 2009 3:30:06 PM GMT+01:00
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [Puppet Users] Missing something with custom facts
Reply-To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>

Hi,

I can't seem to get custom facts up and running .. its works if I run it 
manually but when running puppetd its does not work.

puppet version 0.25.1-3

custom fact put in /etc/puppet/modules/hardware/lib/facter/raidcontroller.rb:
Facter.add("storagecontroller") do
       confine :kernel => :linux
       ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
       controller = []
setcode do
        lspciexists = system "/bin/bash -c 'which lspci >&/dev//null'"
        if $?.exitstatus == 0
        output = %x{lspci}
                output.each {|s|
                controller.push($1) if s =~ /RAID bus controller: (.*)/
                }
                output.each {|s|
                controller.push($1) if s =~ /SCSI storage controller: (.*)/
                }
        end
if controller.length==0
controller.push("Unknown")
end
controller
end

end

#:~/rubylib# facter |grep storagecontroller
storagecontroller => Adaptec AAC-RAID (Rocket) (rev 02)

but when runnig it through puppetd it does not work but it loads:

#:~/rubylib# puppetd --test
info: Retrieving plugin
info: Loading facts in raidcontroller
........

fileserver.conf:
[files]
 path /etc/puppet/files
 allow *

[modules]
  allow *

[plugins]
   allow *

puppet.conf:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
pluginsync=true
server=puppetteer.netgroup.dk
runinterval=3600
report=true

[puppetmasterd]
templatedir=/var/lib/puppet/templates
storeconfigs=false
dbadapter=mysql
dbuser=puppet
dbpassword=Gaeghai6
dbserver=localhost
dbsocket=/var/run/mysqld/mysqld.sock
#reports=rrdgraph,tagmail,store,log
reportdir=/var/lib/puppet/reports
rrddir=/var/lib/puppet/rrd
rrdinterval=$runinterval
reports=tagmail,store
rrdgraph=true

can anyone spot what I'm missing ?

Best regards
Kim

--

You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to 
[email protected]<mailto:[email protected]>.
To unsubscribe from this group, send email to 
[email protected]<mailto:[email protected]>.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



--

You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.


Reply via email to