Hello all!

I am using open source puppet 3.0.1 on both the client and master. The 
issue I am having is that I cannot get a simple custom fact to be 
recognized in my manifest. Hopefully I am missing something. 

I am trying to have a custom fact that will tell me whether the nsclient++ 
directory exists or not.
Here's the custom fact, which is located at 
/etc/puppet/environments/windows/modules/nscp-test/lib/facter

Facter.add(:nsclient) do
setcode do
if File.exists?("c:/program files/nsclient++")
  puts ''nsclient installed'
else
  puts 'no such directory'
end
end
end


my init.pp is dead simple:

class nscp-test {
        notify{$nsclient :}
}


Here's what happens when I run puppet agent --test on the client (windows 
2003):

C:\Documents and Settings\All Users\Application 
Data\PuppetLabs\puppet\var\lib\facter>puppet agent --test
Info: Retrieving plugin
Info: Loading facts in C:/Documents and Settings/All Users/Application 
Data/PuppetLabs/puppet/var/lib/facter/nsclient.rb
no such directory
no such directory
Info: Caching catalog for <snipped>
Info: Applying configuration version '1360274145'
Notice: undef
Notice: /Stage[main]/Nscp-test/Notify[undef]/message: defined 'message' as 
'undef'
Notice: Finished catalog run in 0.42 seconds


from the command line,  facter --puppet nsclient works just fine.

So am I missing something dead simple, or what? This is my first time doing 
custom facts.

Thanks,

Dan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to