Problems installing git for windows using Puppet

354 views
Skip to first unread message

Louis

unread,
May 23, 2013, 10:52:21 AM5/23/13
to puppet...@googlegroups.com
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
}

Paul Tötterman

unread,
May 24, 2013, 2:57:00 AM5/24/13
to puppet...@googlegroups.com

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.

Any particular reason you're using a file and a exec resource? I have a samba share and the following:

     package { 'VLC media player 2.0.5':
        source          => "${software::swpath}\\vlc\\vlc-2.0.5.exe",
        install_options => ['/L=1033', '/S'],
    }

It's not git, but you might want to try it.

Cheers,
Paul

Kevin D

unread,
May 24, 2013, 12:30:20 PM5/24/13
to puppet...@googlegroups.com
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.

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
Reply all
Reply to author
Forward
0 new messages