On Wed, Apr 2, 2014 at 7:50 AM, Stefan Wiederoder <stefanwi...@googlemail.com> wrote:
we´ve had trouble with the new version too:--
[root@zoe ~]# facter
undefined method `kernel' for Facter:Module
result was a downgraded to 1.7.5-1
RHEL6-64 with
ruby: 1.8.7.352
puppet: 3.4.3
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e43da920-62a8-4c79-b039-77a10dca927d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
root@devel69 facts.d]# facter --debug --trace
Not an EC2 host
undefined method `kernel' for Facter:Module
/var/lib/puppet/lib/facter/kis_horcm.rb:5:in `<top (required)>'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:115:in `load'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:115:in `load_file'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:49:in `block (2 levels) in load_all'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:47:in `each'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:47:in `block in load_all'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:45:in `each'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:45:in `load_all'
/usr/share/ruby/vendor_ruby/facter/util/collection.rb:104:in `load_all'
/usr/share/ruby/vendor_ruby/facter.rb:126:in `to_hash'
/usr/share/ruby/vendor_ruby/facter/application.rb:46:in `run'
/usr/bin/facter:16:in `<main>'
[root@devel69 facts.d]# cat /var/lib/puppet/lib/facter/kis_horcm.rb
if Facter.kernel == "Linux"
Facter.add("kis_horcm") do
setcode do
File.exist?("/etc/horcm.conf")
end
end
end
[root@devel69 facts.d]# rpm -qa | grep facter
facter-2.0.1-1.el7.x86_64
[root@devel69 facter]# cat /usr/share/ruby/vendor_ruby/facter/kernel.rb
# Fact: kernel
#
# Purpose: Returns the operating system's name.
#
# Resolution:
# Uses Ruby's rbconfig to find host_os, if that is a Windows derivative, the
# returns 'windows', otherwise returns "uname -s" verbatim.
#
# Caveats:
#
Facter.add(:kernel) do
setcode do
require 'facter/util/config'
if Facter::Util::Config.is_windows?
'windows'
else
Facter::Core::Execution.exec("uname -s")
end
end
end
[root@devel69 facter]# uname -s
Linux
if Facter.kernel == "Linux"if Facter.kernel => :Linux[root@devel69 facts.d]# cat /var/lib/puppet/lib/facter/kis_horcm.rb
if Facter.kernel == "Linux"
Facter.add("kis_horcm") do
setcode do
File.exist?("/etc/horcm.conf")
end
end
end