git

Git client installation and configuration

iNet Process

inet

10,381 downloads

5,098 latest version

3.1 quality score

Version information

  • 1.2.0 (latest)
  • 1.0.1
  • 1.0.0
  • 0.1.0
released Sep 14th 2017
This version is compatible with:
  • Puppet 3.x
  • Ubuntu
    ,
    Debian

Start using this module

Tags: git

Documentation

inet/git — version 1.2.0 Sep 14th 2017

inet-git

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with git
  4. Usage - Configuration options
  5. Reference

Overview

Git client installation and configuration. Tested on Debian and ubuntu, and should work on RedHat family.

Module Description

Uses the git config command to apply configuration in various places.

Setup

What git affects

  • git package.
  • git configuration.

Beginning with git

include ::git is enough to install git and fetch configuration from hiera.

Usage

Specific configurations:

class { 'git':
    git_config => {
        "color.ui" => {
            value => 'auto',
        }
    }
}

You can also use a hiera hash to manage your configuration.

---
git_config:
    color.ui:
        value: auto
        user: foobar
    alias.ci:
        value: commit
    alias.add_hooks
        user: foo
        dir: '/var/www'
        value: ".hooks/add_hooks.sh"
    alias.stop
        ensure: absent
        zone: global
        user: bar

Reference

Class: git

Parameters

git_config Pass a hash to create git::config resources.

Type: git::config

title Can be in the form section.key.

ensure Manage the presence of the configuration key.

dir Specify a git repository to which apply the configuration.

key Configuration key to manage. Default guessed from title.

section Configuration section for the key to manage. Default guessed from title.

user Apply the configuration for the user. Default 'root'.

value Value of the configuration. This string must escape single and double quotes with a backslash.

zone Which configuration file to modify. If dir is set, zone is not used. Default : 'system' if no user is specified, else 'global'.

Examples

git::config { 'color.ui':
  value => true,
}

git::config { 'color.ui':
  value => true,
  user  => bar,
}
```