Forge Home


Module for manipulating git repository checkouts


5,544 latest version

5.0 quality score

Version information

  • 1.0.2 (latest)
  • 1.0.1
  • 1.0.0
  • 0.4.0
released Oct 20th 2018
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppet-git_resource', '1.0.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-git_resource
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-git_resource --version 1.0.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Tags: git, provider, type


puppet/git_resource — version 1.0.2 Oct 20th 2018

Puppet git resource

Build Status

puppetlabs-vcsrepo supports git, however I don't use other vcsrepo types, and bare repos. This is a simpler example implementing a git specific module, while adding automatic dependency against git class which vcsrepo type can not assume.


  • This project have been migrated to puppet-community, please adjust your repo git source.


  • RedHat
  • Debian


git resource

git resource will automatically depend on the git class, and the parent file directory.

git { '/opt/repo/vcsrepo':
  ensure => present,
  commit => '4d2942edc26e7cd144a3178a1a7f6470ea401345',
  origin => '',
  # automatic dependencies:
  # require => [ File['/opt/repo'], Class['git'] ],

git { 'vcsrepo':
  path   => '/opt/repo/vcsrepo2',
  ensure => present,
  branch => 'master',
  latest => true,
  origin => '',

git { 'vcsrepo1':
  path   => '/tmp/vcsrepo1',
  ensure => present,
  tag    => '1.1.0',
  origin => '',


puppet lint, rspec puppet, and acceptance testing in vagrant (or equivalence) should be completed:

  1. bundle install
  2. bundle exec rake lint
  3. bundle exec rake spec
  4. bundle exec rake vagrant