git_resource

Module for manipulating git repository checkouts

Vox Pupuli

puppet

7,636 downloads

3,811 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
  • RedHat
    ,
    CentOS
    ,
    Ubuntu

Start using this module

Tags: type, git, provider

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