Hi all, I''m trying to setup a puppet installation on FreeBSD. So far I have only one puppetmaster and one puppetclient, both with 0.24.4 from FreeBSD ports. On the master I''ve defined a couple of classes including this: class apache22 { package { apache22: ensure => installed, source => "http://x.x.x.x/packages/apache-2.2.9_5.tbz", provider => freebsd } service { "apache22": ensure => running, enable => true, hasstatus => true, hasrestart => true } } And my site.pp is: import "classes/*" node default { include test include ruby186 include sudo include apache22 } Now when I run puppetd --test the first time it installs and starts apache. But on all following runs I get: err: //Node[default]/apache22/Package[apache22]/ensure: change from absent to present failed: Execution of ''/usr/sbin/pkg_add http://x.x.x.x/packages/apache-2.2.9_5.tbz'' returned 256: pkg_add: package ''apache-2.2.9_5'' or its older version already installed It seems to me that puppet is not registering the installation of the package the first time around. What am I doing wrong here? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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 -~----------~----~----~----~------~----~------~--~---
Peter Meier
2008-Dec-12 14:14 UTC
[Puppet Users] Re: Puppet keeps trying to install packages
Hi [...]> class apache22 { > package { apache22: > ensure => installed, > source => "http://x.x.x.x/packages/apache-2.2.9_5.tbz", > provider => freebsd > }[...]> It seems to me that puppet is not registering the installation of the > package the first time around. What am I doing wrong here?exactly. the namevar of the package (in your case apache22) is used to query the package manager of the system, if the package is already installed. However the name of the package is not apache22 it is apache, therefore it fails. Or how else could puppet know about the actual package name? so change package { apache22 to package { apache and it will work. At least I hope it does. cheers pete --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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 -~----------~----~----~----~------~----~------~--~---
Jacob Atzen
2008-Dec-12 15:00 UTC
[Puppet Users] Re: Puppet keeps trying to install packages
Hi Peter, It worked, thanks! On Fri, Dec 12, 2008 at 3:14 PM, Peter Meier <peter.meier@immerda.ch> wrote:> > Hi > > [...] > > > class apache22 { > > package { apache22: > > ensure => installed, > > source => "http://x.x.x.x/packages/apache-2.2.9_5.tbz", > > provider => freebsd > > } > > [...] > > > It seems to me that puppet is not registering the installation of the > > package the first time around. What am I doing wrong here? > > exactly. > > the namevar of the package (in your case apache22) is used to query > the package manager of the system, if the package is already > installed. However the name of the package is not apache22 it is > apache, therefore it fails. Or how else could puppet know about the > actual package name? > so change package { apache22 to package { apache and it will work. > > At least I hope it does. > > cheers pete > > > >-- Med venlig hilsen - Jacob Atzen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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 -~----------~----~----~----~------~----~------~--~---