In response to your first comment, it certainly should be idempotent. Puppet should be able to determine that the rpm is already installed, and I believe that is just a local "rpm -q" or something. So, I don't think it should hit the URL unless it doesn't think it's installed. This can happen, though, when the name of the resource doesn't match the name that "rpm -qa" returns. Perhaps you can provide the output of one of the non-idempotent puppet runs with the --debug and --trace options.
I also occasionally use something like this for packages that have a different name when you install vs when you query. FreeBSD is full of this: http://pastie.org/397847 What's not clear to me is how to tell rpm to do an "-U" update instead of an "-i" install. I believe I have used execs to get around this in the past. As far as building from source, I just create a puppet definition like so: http://pastie.org/397821 And I use it like this: http://pastie.org/397827 If there is a better way out there, I'm all ears! :) Anyways, I hope that helped in some way. - Jeremy On Feb 23, 7:40 am, "Michael L. Artz" <[email protected]> wrote: > Sorry for the topic confluence, but I was wondering if there were > common puppet "idioms" for either: > > - distributing an RPM to a series of clients (namely RabbitMQ) and > installing the package? I realize that I can do it naively by pulling > the file from the puppetmaster and then using the package resource to > install it via RPM, but I was wondering if there was a better way to > do this. I would love to be able to install via RPM with a URL (i.e. > rpm -Uvh http://....), but the command that actually gets executed > with puppet (something like 'rpm -i --oldpackage http://....) doesn't > seem to be idempotent, i.e. it fails after the package is already > installed. Also, I would rather not have all of my puppets calling > out to the rpm url every 2 minutes. > > - distributing and compiling a tarball? Its a pretty standard > autoconf/automake tarball (i.e. './configure --prefix=/usr; make; make > install') ... is there a "standard" way to do this with puppet. I'm > also using a source-built Ruby and RubyGems, which would be nice to > manage with puppet. > > I've looked through a bunch of existing modules, but I haven't seen > this sort of thing. > > Thanks for any help, > -Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
