Puppet FreeBSD could not autoload provider

116 views
Skip to first unread message

aminos

unread,
Apr 18, 2014, 4:40:47 AM4/18/14
to puppet...@googlegroups.com

Hi everyone ,

I’m trying to install package via puppet with this basic node on a Freebsd 9.1

My manifest "nano.pp" :

Node default {

                Package { nano:

                               Name=> “nano”,

                               Ensure => installed,

                               }

}

And when I do a puppet apply of this code I get the error:

Could not autoload puppet/provider/package/freebsd : undefined method ‘intern’ for puppet ::util ::package :Module

Could not autoload puppet/provider/package/ports:  could not autoload puppet/provider/package/freebsd: undefined method ‘intern’ for puppet::util::package:module

Could not autoload puppet/type/package:  could not autoload puppet/provider/package/freebsd: : could not autoload puppet/provider/package/freebsd : undefined method ‘intern’ for puppet::util::package:module

Manual installation works and if I use an puppet exec type (command => “/usr/sbin/pkg_add –r nano”) it works too but it’s not optimized.

On the freebsd I have Puppet-3.0.1_1.

I tried

 provider => freebsd  and provider =>  pkg

ensure => present

but I have the same error message

Furthermore my puppet.conf is empty because i'm only using a puppet apply in my local machine.

Did someone ever managed to install packages via puppet on a FreeBSD machine?

Thank you.


R. Tyler Croy

unread,
Apr 18, 2014, 6:37:10 PM4/18/14
to puppet...@googlegroups.com, puppe...@googlegroups.com

On 04/18/2014 01:40, aminos wrote:

I’m trying to install package via puppet with this basic node on a Freebsd 9.1

My manifest "nano.pp" :

Node default {

                Package { nano:

                               Name=> “nano”,

                               Ensure => installed,

                               }

}

And when I do a puppet apply of this code I get the error:

Could not autoload puppet/provider/package/freebsd : undefined method ‘intern’ for puppet ::util ::package :Module

Could not autoload puppet/provider/package/ports:  could not autoload puppet/provider/package/freebsd: undefined method ‘intern’ for puppet::util::package:module

Could not autoload puppet/type/package:  could not autoload puppet/provider/package/freebsd: : could not autoload puppet/provider/package/freebsd : undefined method ‘intern’ for puppet::util::package:module

Manual installation works and if I use an puppet exec type (command => “/usr/sbin/pkg_add –r nano”) it works too but it’s not optimized.


Did you install Puppet from FreeBSD ports or did you build and install it yourself?

I manage packages with Puppet quite often, but using 10.0-RELEASE and -CURRENT with the puppet-pkgng provider (available from Forge)


I've cc'd the puppet-bsd group just in case anybody there has seen it

Felix Frank

unread,
Apr 22, 2014, 8:33:08 AM4/22/14
to puppet...@googlegroups.com
Hi,

please node that case and capitalization are important in puppet manifests!

On 04/18/2014 10:40 AM, aminos wrote:
> Node default {

should be 'node'.

> Package { nano:

should be 'package' (capital P only for resource defaults,
http://docs.puppetlabs.com/puppet/latest/reference/lang_defaults.html)

> Name=> “nano”,

should be omitted actually :)

> Ensure => installed,

should be 'ensure'

> }
>
> }

Regards,
Felix
Reply all
Reply to author
Forward
0 new messages