Forge Home

git_resource

Module for manipulating git repository checkouts

10,629 downloads

6,537 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

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.

Download
Tags: git, provider, type

Documentation

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.

Warning

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

Compatibility

  • RedHat
  • Debian

Usage

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 => 'git@github.com:puppetlabs/puppetlabs-vcsrepo.git',
  # automatic dependencies:
  # require => [ File['/opt/repo'], Class['git'] ],
}

git { 'vcsrepo':
  path   => '/opt/repo/vcsrepo2',
  ensure => present,
  branch => 'master',
  latest => true,
  origin => 'git@github.com:puppetlabs/puppetlabs-vcsrepo.git',
}

git { 'vcsrepo1':
  path   => '/tmp/vcsrepo1',
  ensure => present,
  tag    => '1.1.0',
  origin => 'https://github.com/puppetlabs/puppetlabs-vcsrepo.git',
}

Contributing

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