Puppet Class: git
- Defined in:
- manifests/init.pp
Overview
Public: Install and configure git from homebrew.
Examples
include git
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'manifests/init.pp', line 6
class git (
$package = $git::package,
$configdir = $git::configdir,
$credentialhelper = $git::credentialhelper,
$global_credentialhelper = $git::global_credentialhelper,
$global_excludesfile = $git::global_excludesfile,
) {
package { $package: }
file { $configdir:
ensure => directory
}
if $credentialhelper {
file { $credentialhelper:
ensure => file
}
}
if $global_credentialhelper {
file { $global_credentialhelper:
ensure => link,
target => $credentialhelper,
before => Package[$package],
require => File[$credentialhelper]
}
git::config::global{ 'credential.helper':
value => $global_credentialhelper
}
}
file { "${configdir}/gitignore":
source => 'puppet:///modules/git/gitignore',
require => File[$configdir]
}
git::config::global{ 'core.excludesfile':
value => $global_excludesfile,
require => File["${configdir}/gitignore"]
}
if $::gname {
git::config::global{ 'user.name':
value => $::gname
}
}
if $::gemail {
git::config::global{ 'user.email':
value => $::gemail
}
}
}
|