Louis,

Unfortunately, the way that Git for Windows is packaged, it doesn't update 
the registry (HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall) or 
touch the Windows Installer Database (and update the WMI Win32_Product).  
As a result, no matter how you perform the installation (using either the 
"exec" or "package" types), each subsequent Puppet run will invoke a 
reinstall/repair of the product (and most likely this will be undesirable 
behavior). 
Reference<https://groups.google.com/forum/#!searchin/puppet-users/windows$20dotnet$20framework/puppet-users/C0YD_zzYq9o/x5LiK_p5rtcJ>
.

Therefore, you will need to create a method to determine if it is 
installed.  One way of doing this is to write a check file after install.

I tested your manifest on a Windows 2008 R2 SP1 box and it was successful 
(I didn't get a timeout).  You may want to use Microsoft's Process Monitor 
to determine the "command line" call to the exe. 

exec:
file {$pkg:
  ensure => present,
  name   => 'C:\Temp\Git-1.8.1.2-preview20130201.exe',
  #source => 'puppet:///puppetfs/Git-1.8.1.2-preview20130201.exe',
  source => "x:\\Git-1.8.1.2-preview20130201.exe",
  mode   => '0755',
  before => Exec[$pkg],
}

exec {$pkg:
  creates   => 'C:\Program Files (x86)\Git\bin',
  command   => 'C:\Windows\sysnative\cmd.exe /c 
"C:\Temp\Git-1.8.1.2-preview20130201.exe /silent"',
  logoutput => true,
  timeout   => 900,
}

package:
file {$pkg:
  ensure => present,
  name   => 'C:\Temp\Git-1.8.1.2-preview20130201.exe',
  #source => 'puppet:///puppetfs/Git-1.8.1.2-preview20130201.exe',
  source => "x:\\Git-1.8.1.2-preview20130201.exe",
  mode   => '0755',
  before => Package[$pkg],
}

package {$pkg:
  ensure => installed,
  source =>'C:/Temp/Git-1.8.1.2-preview20130201.exe',
  install_options => '/silent',
}

-Kevin

On Thursday, May 23, 2013 8:52:21 AM UTC-6, Louis wrote:
>
> This might not be related to Puppet but it seems that the installation 
> process hangs. I have tried this configuration on an empty w2008r2 VM.
>
> file { $pkg:
>   ensure => present,
>   name   => 'C:\Temp\Git-1.8.1.2-preview20130201.exe',
>   source => 'puppet:///puppetfs/Git-1.8.1.2-preview20130201.exe',
>   mode   => '0755',
>   before => Exec[$pkg]}
> exec { $pkg:
>   creates   => 'C:\Program Files (x86)\Git\bin',
>   command   => 'C:\Windows\sysnative\cmd.exe /c 
> "C:\Temp\Git-1.8.1.2-preview20130201.exe /silent"',
>   logoutput => true,
>   timeout   => 900}
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to