Puppet agent cannot download code from Git

I have a puppet master setup on an ubuntu 14.4 VM. Puppet agent like Windows 8.

here is my site.pp file.

package { 'git' :
  ensure => present,
}

vcsrepo { "C:\\GitCode":
  ensure => present,
  provider => git,
  source => "git://<url>.git",
}

      

It will just download the code from the url and put it in C: \ GitCode. I installed the packages git

and vcsrepo

on the master.

I got the following error when starting the agent in windows:

Running Puppet agent on demand ...
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for <certname>
Warning: Found multiple default providers for vcsrepo: dummy, p4; using dummy
Info: Applying configuration version '1436188748'
Error: The source parameter is required when using the Windows provider.
Error: /Stage[main]/Main/Package[git]/ensure: change from absent to present failed: The source parameter is required when using the Windows provider.
Error: /Stage[main]/Main/Vcsrepo[C:\GitCode]: Provider git is not functional on this host
Notice: Finished catalog run in 2.05 seconds
Press any key to continue . . .

      

+3


source to share


1 answer


So there are several things here. First, git is not installed by puppet. You need to provide a source to install it as the agent is a window. So this means that you will download the git exe installer and place it in your subdirectory of your module files.

package { 'git' :
  ensure => present,
  source => 'puppet:///{yourmodule}/Git-1.8.1.2-preview20130201.exe',
}

      



Once it correctly installs git on the agent, then vcsrepo will use the correct provider (i.e. - git) and pull the git repository.

+2


source







All Articles