Hello again,
I found out that something has changed in way how facter elements has to
use.
old style
if Facter.kernel == "Linux"
new style
if Facter.kernel => :Linux
I think iI have to check some of our scripts ...
sorry for making noise here ...
Am Donnerstag, 31. Juli 2014 14:08:18 UTC+2 schrieb Madd Sauer:
>
> Hello Jeff,
>
> I am a coworker of Stefan.
>
> 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
>
>
> We got this on #RHEL6 and #RHEL7
>
> [root@devel69 facts.d]# rpm -qa | grep facter
> facter-2.0.1-1.el7.x86_64
>
> I checked if facter module 'kernel' is present
>
> [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
>
> so this looks good.
>
> I also checkd 'uname'
>
> [root@devel69 facter]# uname -s
> Linux
>
>
>
>
>
>
>
> Am Mittwoch, 2. April 2014 18:04:48 UTC+2 schrieb Jeff McCune:
>>
>> For those that are getting the undefined method errors, could you please
>> run with --debug and --trace and paste the results so we could see a bit
>> more information about where those methods are called from?
>>
>> Thanks,
>> -Jeff
>> -Jeff
>>
>>
>> On Wed, Apr 2, 2014 at 7:50 AM, Stefan Wiederoder <
>> [email protected]> 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 [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/puppet-users/e43da920-62a8-4c79-b039-77a10dca927d%40googlegroups.com
>>>
>>> <https://groups.google.com/d/msgid/puppet-users/e43da920-62a8-4c79-b039-77a10dca927d%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/aa2c8f4f-ca2e-402c-ab5f-e4e0e7b8d300%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.