Forge Home

git

Git client module to clone repos

45,667 downloads

44,245 latest version

3.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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.0 (latest)
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Jul 11th 2013

Start using this module

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

Add this module to your Puppetfile:

mod 'jproyo-git', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add jproyo-git
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install jproyo-git --version 0.1.0

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

Documentation

jproyo/git — version 0.1.0 Jul 11th 2013

puppet-git

============

A puppet module for managing git resources

To install into puppet

Clone into your puppet configuration in your puppet/modules directory:

git clone git://github.com/nesi/puppet-git.git git

Or if you're managing your Puppet configuration with git, in your puppet directory:

git submodule add git://github.com/nesi/puppet-git.git modules/git --init --recursive
cd modules/git
git checkout master
git pull
cd ../..
git commit -m "added git submodule from https://github.com/nesi/puppet-git"

It might seem bit excessive, but it will make sure the submodule isn't headless...

Usage

To install git

A basic install with the defaults would be:

 include git

Otherwise using the parametrs:

class{git:
  svn => true,
  gui => true,
}

Parameters

  • svn if true the git-svn package will also be installed
  • gui if true the git-gui package will also be installed

To specify a git repository

This will clone a git repository from a vaild git URI to a specified path on the target server. It is strongly recommended that read-only git URIs are used. If no source is given, the target path will simply be initialised as a git repository.

With minimum parameters, should create the directory /usr/src/repo and run git init in it:

git::repo{'repo_name':
  path => '/usr/src/repo',
}

With minimum parameters to clone from a remote source:

git::repo{'repo_name':
 path   => '/usr/src/repo',
 source => 'git://example.org/example/repo.git'
}

Parameters

  • path sets the path where the git repository is created or cloned to
  • source sets the git URI from which the git repository is cloned from
  • branch this string sets a specific branch to check out
  • git_tag this string sets a specific tag to check out
  • update if set to true, when puppet runs it will revert any local changes and pull the current branch from the source if there is any difference between the local repository and the source repository.
  • bare if set to true, it creates a bare repository

Note: I am uncertain on how it will behave if both tag and branch are set, but tag should override branch.

Dependencies

Attribution

This module is derived from the puppet-blank module by Aaron Hicks (aethylred@gmail.com)

This module has been developed for the use with Open Source Puppet (Apache 2.0 license) for automating server & service deployment.

Gnu General Public License

This file is part of the git Puppet module.

The git Puppet module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The git Puppet module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the git Puppet module. If not, see http://www.gnu.org/licenses/.