[Puppet Users] Re: Proposal to remove redundant info in source = parameters
Please no backticks or other characters like ~, those of us who do not have a U.S. keyboard layout have a hard time typing them (2-to-3 keys combinations in some cases). On Sep 28, 7:33 am, Patrick kc7...@gmail.com wrote: On Sep 27, 2010, at 10:08 PM, Luke Kanies wrote: On Sep 27, 2010, at 7:04 AM, Brice Figureau wrote: Hi, It looks like I missed your original e-mail to puppet-dev. On Fri, 2010-09-24 at 11:20 -0700, Nigel Kersten wrote: [cross-posting as I'd like to know whether my intuition about this being the most common case is correct] class foo { file { /etc/foo.conf: source = puppet:///modules/foo/foo.conf, } } For me, every single one of my source specifications refers to a file inside the current module. My intuition is that this is the most common case outside my own deployment, so why don't we optimize for it? class foo { file { /etc/foo.conf: source = foo.conf, } } eg the proposal is that if you don't specify the protocol, server address, modules prefix, module name, it is assumed you are referring to a file path relative to the 'files' subdirectory of the current module. If you wish to fully specify the source URI, you're free to do so. My issue with your proposal is that at first glance it will look like a local copy (which should require an absolute path) and not a remote copy. This certainly violate the least surprise paradigm for new users. What about a new URI scheme (ie module) which would do the same: class foo { file { /etc/foo.conf: source = module://foo.conf, } } Another option is a new function: class foo { file { /etc/foo.conf: source = expand(foo.conf) } } Then all of the smarts could be in expand(). OTOH, I think it's a bit think in terms of syntax. Backticks? :) Single quotes are popular enough that I think backticks would be a nightmare. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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.
[Puppet Users] Re: Newbie question - package installation
I'm using 0.25.5 and I do it in pretty much the same way: file { oratoolkit_rpm: require = [ Group[oinstall], Group[dba], User[oracle], ], path = /home/admin/install/oratoolkit-1.0.2.1.4-1.noarch.rpm, source = puppet:///oracle/oratoolkit-1.0.2.1.4-1.noarch.rpm, owner = admin, group = admin, ensure = present, } # installs the oratoolkit package package { oratoolkit: require = File[oratoolkit_rpm], source = /home/admin/install/oratoolkit-1.0.2.1.4-1.noarch.rpm, provider = rpm, ensure = installed, } Try adding an ensure = present to your File resource and see if it avoids downloading the RPM file over and over again. On Jul 29, 10:40 pm, Rustler coltsixshoo...@gmail.com wrote: I am using version 2.6 and it would be nice if you could use a puppet url for the package source, but that does not appear to work (docs say it has to be a local file). My other choices seem to be an nfs mount, or a local repo server. Thanks On Jul 29, 11:23 am, Patrick Mohr kc7...@gmail.com wrote: On Jul 29, 2010, at 9:45 AM, Rustler wrote: This code is working - but due to the file declaration it keeps downloading the rpm even after the package gets installed. 1. How do I stop the rpm from downloading after the package is installed? Best method: *) If at all possible you should just replace this with a real package repository. Should also work: *) Put the rpm files on a webserver and download them as needed. I think rpm can take URLs instead of local paths. or *)Install from a network drive like nfs Not recommended: *) Just put the rpms into a folder you create. It will keep growing forever, but it probably won't ever get very big unless you release a lot of packages. Trust me on this, pushing out big files with puppet is probably a mistake. It will put a large load on the puppetmaster, and if you are using a version of puppet less than 2.6.0, the RAM requirements on the client and serve will be horrendous. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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.