On Wed, Jul 15, 2015 at 4:51 PM, Phil Manuel <flar...@gmail.com> wrote:

> Hi,
>
> If I do a clean install of CentOS 7 with facter and puppet, my puppet
> fails with
>
> puppet agent -t
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Error: Could not retrieve local facts: undefined method `hostname' for
> Facter:Module
> Error: Failed to apply catalog: Could not retrieve local facts: undefined
> method `hostname' for Facter:Module
>
>
It sounds like you're using a module with a custom fact that, on CentOS 7
at least, uses a syntax that was removed in Facter 2.x and later.

Facter 2.x (and Facter 3.x) do not support querying facts via the "method
syntax" on the Facter module itself.

e.g. `Facter.hostname` is not supported in 2.x+; instead, use
`Facter.value(:hostname)`.

Specify `--trace` to puppet and see if you can determine the offending
module in the trace back.


>
> rpm -qa puppet
> puppet-3.8.1-1.el7.noarch
> rpm -qa facter
> facter-2.4.4-1.el7.x86_64
>
> If i run facter hostname it works fine.  If I run puppet facts find
> <hostname>
> Error: Could not call 'find' on 'facts': undefined method `hostname' for
> Facter:Module
> Error: Could not call 'find' on 'facts': undefined method `hostname' for
> Facter:Module
> Error: Try 'puppet help facts find' for usage
>
>
> If I downgrade facter to 1.7.x then it works fine.
>
>
> If I  perform the same process on Fedora 22 which has
>
> rpm -qa facter
> facter-2.4.1-1.fc22.x86_64
> rpm -qa puppet
> puppet-4.1.0-1.fc22.noarch
>
>
> It works fine.
>
> Has anyone got any suggestions ?
>
> Thanks
>
> Phil.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/86d2bf02-7152-4a9a-bd25-9645fbaab7d2%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/86d2bf02-7152-4a9a-bd25-9645fbaab7d2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Join us at **PuppetConf 2015, October 5-9 in Portland, OR - *www.
<http://www.google.com/url?q=http%3A%2F%2Fwww.&sa=D&sntz=1&usg=AFQjCNEnS7itqgvQV3E4Se1fu4Um_UapSw>
2015.puppetconf.com
<http://www.google.com/url?q=http%3A%2F%2F2015.puppetconf.com&sa=D&sntz=1&usg=AFQjCNE1uQL4Sh23Vr-XkPLa4xfNcoXSog>

*Register early to save 40%!*

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACZQQfPUKM8gFS%2B_ikBwSy6ccWhNMz9jSh%2BM_a5-G7GWiOkx6g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to