3

I have puppet master setup on ubuntu 14.4 VM. Puppet agent as 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 simply download code from url and put it into C:\GitCode. I have installed git and vcsrepo packages on master.

While running Agent on windows I got the following error:

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 . . .
pm86
  • 230
  • 2
  • 15
  • What version of the VCS repo module are you using? Because I tried this code in a Windows 8 test lab and it worked ok using the latest version of the VCSrepo module. – Peter Souter Jul 07 '15 at 12:47
  • Thanks mate for reply - I am using vcsrepo 1.3.0 – pm86 Jul 08 '15 at 09:10

1 Answers1

2

So there are a couple of things going on here. The first is that git is not being installed by puppet. You need to provide a source for it to install from since the agent is a windows box. So this means download the installer exe for git and put it in your files subdirectory of your module.

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

Once it properly has git installed on the agent then vcsrepo will use the correct provider (i.e. - git) and pull your git repo.

  • Does that means we need to install Git on Windows Agent and then use the git provider to download repo? for line source => 'puppet:///{yourmodule}/Git-1.8.1.2-preview20130201.exe', git exe will be on master or it should be somewhere on shared location. – pm86 Jul 09 '15 at 05:27
  • 1
    Yes the Git-1.8.1.2-preview20130201.exe would be on the master. Your site.pp will be run and try to transfer that file from the master to the agent and install git on the agent. https://docs.puppetlabs.com/guides/file_serving.html – TwoDrinkTech Jul 09 '15 at 12:06