On 11/16/2010 09:33 AM, JWBoerma wrote:
hello,

I am trying to add a custum fact to my puppet module.
I wrote and tested the facter script and it functions as I want it to.
I've got the same issue, trying to distribute a custom fact. I'd like to return the version of Plesk Panel running on the client.

So I wrote and tested a little fact:

# cat plesk_version.rb
require 'facter'
Facter.add("plesk_version") do
  setcode do
    %x{cat /usr/local/psa/version}.chomp
  end
end
r...@test10:~/lib/ruby/facter#

facter finds this on the client and it returns what I'm looking for.

I want to put this on the server and distribute it. My puppet clients and puppetmaster server are 0.25.4.

On the puppetmaster I edited /etc/puppet/puppet.conf:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
pluginpath=$vardir/lib/facter
pluginsync=true

[puppetmasterd]
#templatedir=/var/lib/puppet/templates
factsync=true
factpath=$vardir/facts

and also fileserver.conf:
# cat /etc/puppet/fileserver.conf
[files]
path /var/lib/puppet/files
allow *
[plugins]
path /var/lib/puppet/facts
allow *



I put my fact file (plesk_version.rb) in the /var/lib/puppet/facts directory. I also put a copy in the /var/lib/puppet/plugins directory.

On my client, I ran the puppetd with this command:
# /usr/sbin/puppetd --no-daemonize --verbose --onetime  --pluginsync

I got this:
info: Retrieving plugin
err: /File[/var/lib/puppet/lib]: Failed to retrieve current state of resource: Could not retrieve information from source(s) puppet://xxx.xxxxx.net/plugins notice: /File[/var/lib/puppet/lib/facter]: Dependency file[/var/lib/puppet/lib] has 1 failures warning: /File[/var/lib/puppet/lib/facter]: Skipping because of failed dependencies

This seems to have changed some in 0.25.4, and googleing around has not helped.

May I have a pointer to the correct process?

Thanks,
Ed Greenberg

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

Reply via email to