-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 My suggestion, if possible, is to run a nightly cron job that updates everything on the system.
This way, puppet only manages the things you actually want to manage. Trevor On 09/12/2009 04:56 PM, ELTigre wrote: > > On Sep 12, 10:10 am, Chris Blumentritt <cblum...@gmail.com> wrote: > Hi Chirs, > > I only use debian lenny on my servers. I just want to create a class > with all package from APT to keep them up2date all the time with this > configuration (ensure => latest) and whenever I create a new server it > install all theses packages. > >> The spirit of puppet is to install via the package resource. You could >> write a shell script to install using a text file as a data source then use >> the exec resource using onlyif to check to see if you need to run it. What > How does "onlyif" fits here if I use exec? What should I check to > prevent exec running every time puppet client get the catalog? > >> I would do is create a separate class in its own manifest file and do some >> fancy searching and replacing (matching beginnings and endings of lines) >> with your list of packages. Since you have so many packages I doubt the >> resource will be more than one line. End up with something like: >> package { "package_name": ensure => installed } > Coul you explain me this, please? :-) > >> > > >> You might run into trouble here if you are using different distros of linux >> or linux and freebsd as the package names may be different. You would get >> the benefit of later being able to hit the file and change installed to >> latest if you want update a specific package though. >> >> I have never heard of a file being used as a source for a resource but it is >> an interesting thought. You might get away with an inline template to do >> that but that would be dirty: >> >> package { inline_template("<%= filename.each_line.collect %>"): >> require => File["filename"], >> ensure => installed > I'll test it and let you know. > > thanks a lot. > regards, > israel >> >> } >> >> I have no idea if the above will work and I doubt the erb is correct since >> my ruby sucks. >> >> Chris >> >> On Sat, Sep 12, 2009 at 12:02 AM, ELTigre <igalva...@gmail.com> wrote: >> >>> How can I install a lot (more than 800) of APT packages using an easy >>> way in puppet? I mean, using some file.txt where I put there the >>> packages I want to install and my package resource get the list . Is >>> it possible? Or do I have to put all packages in the package resource? >> >>> regards, >>> Israel. > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqti2kACgkQyjMdFR1108B0EQCeIEFZC0Thahsf27RGGeal7Qpv MX0An2Kkuwo6a1o0kvtGwq1gei9UHnEu =lkQl -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---