Re: [Puppet Users] Puppet and FreeBSD

Darryl Wisneski
Mon, 23 Apr 2012 14:21:36 -0000

On Mon, Apr 23, 2012 at 07:08:48AM -0700, Jamie Scott
wrote:
> dkw, that worked!
>
> Now I only need to use: package { ''mytop'': ensure =>
installed }

How have you been handling the differences between centos/rhel and
fbsd?  If statements?  I am going the other way where I have manifests
written mostly for fbsd and now will add rhel/debian specific stuff.

Augeas has been a great help mangling text files.  The devs on IRC
#augeas are helpful too.

Regards,
-dkw

>
> I can''t tell you how happy I am!
>
> Thank you!!!
> Jamie
>
>
>
> On Monday, 23 April 2012 14:54:03 UTC+1, dkw wrote:
> >
> > Howdy:
> >
> > On Mon, Apr 23, 2012 at 06:29:38AM -0700, Jamie Scott wrote:
> > > Hello all,
> > >
> > > Wondering if any of you could help me.
> > >
> > > We''ve been using puppet on our CentOS servers for a
while now with no
> > > problems at all, very much out of the box.... but we do have some
MySQL
> > > servers running FreeBSD (for the slightly better memory
utilisation).
> > I''ve
> > > taken up the challenge to get these FreeBSD servers talking to
our
> > puppet
> > > master but I''m having no ends of trouble with trying to
get the
> > manifests
> > > working. Forgetting the operating system variables and just going
for a
> > > straight install of a package such as mytop this is what I have
tried in
> > > our manifest:
> > >
> > > This didn''t seem to work at all:
> > >
> > >      package { ''mytop'': ensure => installed
}
> > > >
> > >
> > >  Gave me this message on the server: *puppet-agent[3232]:
> > > (/Stage[main]/Node[###########]/Package[mytop]/ensure) change
from
> > absent
> > > to present failed: mytop: not in required origin format:
> > > .*/<port_category>/<port_name>*
> > >
> >
> > To get rid of this error you have to build the puppet from ports
> > on the freebsd client host and uncheck the PACKAGE_ORIGIN option.
> > I don''t pretend to understand why.
> >
> > cd /usr/ports/sysutils/puppet ; make install
> >
> > # cat /var/db/ports/puppet/options
> > # This file is auto-generated by ''make config''.
> > # No user-servicable parts inside!
> > # Options for puppet-2.7.12
> > _OPTIONS_READ=puppet-2.7.12
> > WITHOUT_MONGREL=true
> > WITHOUT_PACKAGE_ORIGIN=true
> > WITHOUT_PACKAGE_ROOT=true
> >
> > The below package stanza looks correct.
> >
> > -dkw
> >
> > >
> > > So instead I tried listing the full port name even with the
provider:
> > >
> > >     package { ''.*/databases/mytop'':
> > > >             ensure => installed,
> > > >             provider => freebsd,
> > > >             }
> > > >
> > >
> > > Now it is giving me this message: *puppet-agent[3232]:
> > (/Stage[main]//Node[*
> > > *###########**]/Package[.*/databases/mytop]/ensure) change from
absent
> > to
> > > present failed: Could not fetch ports INDEX: 500 Illegal PORT
range
> > > rejected.*
> > >
> > > Even with specifiying a source:
> > >
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.0-release/  I
> > don''t
> > > seem to be getting very far!
> > >
> > > Here is a print out of the debug log:
> > >
> > > debug: Puppet::Type::Package::ProviderFreebsd: Executing
> > > > ''/usr/sbin/pkg_info -aoQ''
> > > > debug: Package: .*/databases/mytop: origin =>
{:port_name=>"mytop",
> > > > :port_category=>"databases"}
> > > > debug: Package: .*/databases/mytop: source =>
#<URI::FTP:0x29869038
> > > >
URL:ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.0-release/
> > >
> > > > debug: Fetching INDEX: #<URI::FTP:0x298684e4
> > > > URL:
> >
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.0-release/INDEX.bz2
> > >
> > > > err:
> > > >
/Stage[main]//Node[boomer.sov.m-w.co.uk]/Package[.*/databases/mytop]/ensure:
> >
> > > > change from absent to present failed: Could not fetch ports
INDEX: 500
> > > > Illegal PORT range rejected.
> > > >
> > >
> > > Some odd behaviour I''ve noticed as well, when packages
are already
> > > installed it doesn''t seem to register as them being
there.
> > >
> > > Looking for information about puppet on FreeBSD is like trying to
find a
> > > needle in a haystack. I hope someone can help, any input would be
> > > appreciated!
> > >
> > > --
> > > 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/-/Bzhfr9UMSNEJ.
> > > To post to this group, send email to
puppet-users@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > puppet-users+unsubscribe@googlegroups.com.
> > > For more options, visit this group at
> > http://groups.google.com/group/puppet-users?hl=en.
> > >
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
> To view this discussion on the web visit