Re: [Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-21 Thread Jeff Sussna
After trying out http://mnaoumov.wordpress.com/2012/07/24/powershell-add-directory-to-environment-path-variable/ I realized it's smart enough to: 1. Read the old PATH value from the registry (thus getting around the facter path problem) 2. Only add the new dir if it's not already in PATH 3. Br

Re: [Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-21 Thread Jeff Sussna
A path type/provider would be great, since the need is so common. For example, 7Zip has an MSI, but to use the command line tools you have to edit PATH. Also, since facter prepends the Puppet dirs to PATH, every time I update PATH from $::path it adds another copy of the Puppet dirs, and quickl

Re: [Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-20 Thread Josh Cooper
Hi Jeff, On Mon, Aug 20, 2012 at 11:43 AM, Jeff Sussna wrote: > OK, I got registry::value working by commenting out the calls to > validate_re. I will file a ticket for that. The registry module has a dependency on the stdlib module. When installing the module on a unix puppet master, the depend

Re: [Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-20 Thread Jeff Sussna
Belay my comment about validate_re. It's in the stdlib module. For some reason the last time I googled it I didn't find anything. If anyone has any bright ideas re getting around the reboot problem I'm all ears. On Monday, August 20, 2012 1:43:26 PM UTC-5, Jeff Sussna wrote: > > OK, I got regi

Re: [Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-20 Thread Jeff Sussna
OK, I got registry::value working by commenting out the calls to validate_re. I will file a ticket for that. Unfortunately, though, the Windows gotchas continue. If you manually edit PATH in the System control panel, the new value shows up the next time you open a new cmd window. If, however, y

[Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-18 Thread Jeff Sussna
I discovered a gotcha with exec'ing "reg add": the change to PATH doesn't show up in the current cmd environment (the one where puppet is being run). That means that, if you add something to PATH multiple times, only the last one will stick. I tried using puppet-registry, but am getting "unknow

Re: [Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-17 Thread Josh Cooper
On Fri, Aug 17, 2012 at 2:38 PM, Jeff Sussna wrote: > Hmm..it appears that $::path is returning multiple copies of the Puppet > paths, along with "/user/bin" (which as you can imagine causes problems for > Windows), in addition to the explicitly defined PATH string. Any idea why? > So I get: C:\

[Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-17 Thread Jeff Sussna
Hmm..it appears that $::path is returning multiple copies of the Puppet paths, along with "/user/bin" (which as you can imagine causes problems for Windows), in addition to the explicitly defined PATH string. Any idea why? On Thursday, August 16, 2012 2:44:16 PM UTC-5, Jeff Sussna wrote: > > I

Re: [Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-17 Thread Josh Cooper
Hi Adam, On Fri, Aug 17, 2012 at 11:27 AM, ad wrote: >> Hey Josh, >> >> On Friday, August 17, 2012 11:38:08 AM UTC-5, Josh Cooper wrote: >> >> >> I have a standardlib type module with generic functions for things like >> >> download, md5, etc. that are used in other custom types. Lacking a >> >>

[Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-17 Thread ad
> > Hey Josh, > > On Friday, August 17, 2012 11:38:08 AM UTC-5, Josh Cooper wrote: > > >> I have a standardlib type module with generic functions for things like > >> download, md5, etc. that are used in other custom types. Lacking a > robust > >> shell, tools, and package management on Windows

Re: [Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-17 Thread Josh Cooper
Hi Adam On Thu, Aug 16, 2012 at 3:19 PM, ad wrote: > Jeff, > > Just to give you more ideas, and as someone who tends to reinvint wheels, > what I do for this sort of thing on Windows is make custom types and use > Ruby to handle download, unzip, md5, etc. Here's how a couple custom types I > use

[Puppet Users] Re: Installing Java software on Windows using Puppet

2012-08-16 Thread ad
Jeff, Just to give you more ideas, and as someone who tends to reinvint wheels, what I do for this sort of thing on Windows is make custom types and use Ruby to handle download, unzip, md5, etc. Here's how a couple custom types I use look in a Puppet manifest: media_player_msi { 'ensure_ms