I''d like to pass command line options for a package installed via a gem provider. In particular, I''m updating puppet, the equivalent command would be: /usr/bin/gem1.8 install puppet -v=2.6.1 --no-rdoc --no-ri (The extra docs that gets installed with puppet take WAY too long and are unnecessary on production). I''m running a very simple "self- update" of Puppet per this thread: http://groups.google.com/group/puppet-users/browse_thread/thread/cb26b8973bc70925 like so: class puppet ($version) { package { "puppet": ensure => $version, provider => gem } } How do I pass command line options? Do I need to create a custom provider? My guess is I''ll probably end up using an "exec" resource with an onlyif condition. Thanks, -Andy -- 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.
Richard Crowley
2010-Nov-05 00:01 UTC
Re: [Puppet Users] command line switches for a provider?
On Thu, Nov 4, 2010 at 4:55 PM, bobics <bobics@gmail.com> wrote:> I''d like to pass command line options for a package installed via a > gem provider. In particular, I''m updating puppet, the equivalent > command would be: > > /usr/bin/gem1.8 install puppet -v=2.6.1 --no-rdoc --no-ri > > (The extra docs that gets installed with puppet take WAY too long and > are unnecessary on production). I''m running a very simple "self- > update" of Puppet per this thread: > http://groups.google.com/group/puppet-users/browse_thread/thread/cb26b8973bc70925 > like so: > > class puppet ($version) { > package { "puppet": ensure => $version, provider => gem } > } > > How do I pass command line options? Do I need to create a custom > provider? My guess is I''ll probably end up using an "exec" resource > with an onlyif condition.RubyGems pays attention to ~/.gemrc so you can set /root/.gemrc to contain gem: --no-rdoc --no-ri before package resources do their thing and they''ll do what you want. -- 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.
James Turnbull
2010-Nov-05 00:08 UTC
Re: [Puppet Users] command line switches for a provider?
bobics wrote:> I''d like to pass command line options for a package installed via a > gem provider. In particular, I''m updating puppet, the equivalent > command would be: > > /usr/bin/gem1.8 install puppet -v=2.6.1 --no-rdoc --no-ri > > (The extra docs that gets installed with puppet take WAY too long and > are unnecessary on production). I''m running a very simple "self- > update" of Puppet per this thread: > http://groups.google.com/group/puppet-users/browse_thread/thread/cb26b8973bc70925 > like so: > > class puppet ($version) { > package { "puppet": ensure => $version, provider => gem } > } > > How do I pass command line options? Do I need to create a custom > provider? My guess is I''ll probably end up using an "exec" resource > with an onlyif condition. >There is a patch here that John Ferlito (or perhaps Lindsay Holmwood - one of the two anyways :) ) wrote: https://github.com/jamtur01/hudson-ec2-build/blob/master/patches/puppet_gem_options.patch James -- Puppet Labs - http://www.puppetlabs.com C: 503-734-8571 -- 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.
Thanks for both solutions. :) Looks like either will work for me. -- 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.