[Puppet Users] can´t call custom fact

2012-06-29 Thread Spter
Hi,

i like to use some custom facts.
My clients are connectet to 1 puppetmaster with mod_passenger and all works 
fine.

Both on puppetmaster and my node:
puppet.conf:
pluginsync = true

on my puppetmaster:
modules/system/manifest/init.pp:
file { /root/my_oc4j:
  ensure = link,
  target = /var/${::oc4j},
}

modules/system/lib/facter/oc4j.rb:
Facter.add(oc4j) do
  ja
end


When i called on my node: 
puppet agent --no-daemonize --onetime --ignorecache --verbose --noop
no error occurs, but the link looks like:
my_oc4j - /var/

So, when i modify the init.pp like:
file { /root/my_oc4j:
  ensure = link,
  target = /var/$oc4j,
}
The link looks like the same.


Does anyone have a idea?


Greetz

Tim

-- 
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/-/f255Zi4C_JEJ.
To post to this group, send email to puppet-users@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.



Re: [Puppet Users] can´t call custom fact

2012-06-29 Thread Tim Mooney

In regard to: [Puppet Users] can?t call custom fact, Spter said (at 6:46am...:


Both on puppetmaster and my node:
puppet.conf:
pluginsync = true

on my puppetmaster:
modules/system/manifest/init.pp:
file { /root/my_oc4j:
 ensure = link,
 target = /var/${::oc4j},
}

modules/system/lib/facter/oc4j.rb:
Facter.add(oc4j) do
 ja
end


When i called on my node:
puppet agent --no-daemonize --onetime --ignorecache --verbose --noop
no error occurs, but the link looks like:
my_oc4j - /var/

So, when i modify the init.pp like:
file { /root/my_oc4j:
 ensure = link,
 target = /var/$oc4j,
}
The link looks like the same.



What does

facter --puppet oc4j

report?  You may need to run that as root or via sudo to get your
custom facts.

If it doesn't output anything, then the problem is that facter isn't
getting the information you expect, so what it reports to the puppet
master is empty.

Next step would be to run

sudo puppet config print all | egrep fact

on the client in question.  That should show a setting for factpath,
probably something like /var/lib/puppet/lib/facter.

Look in that directory.  Does your oc4j.rb file exist in the directory?
If it does, then pluginsync is working correctly, but the code itself
isn't doing what you expect.

If it doesn't exist, then it's not getting synced down to the client(s)
correctly, so you'll need to debug why that is.

Tim
--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing  Infrastructure  701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

--
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.