- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with git
- Usage - Configuration options
- Reference
Git client installation and configuration. Tested on Debian and ubuntu, and should work on RedHat family.
Uses the git config
command to apply configuration in various places.
- git package.
- git configuration.
include ::git
is enough to install git and fetch configuration from hiera.
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
git_config
Pass a hash to create git::config resources.
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'.
git::config { 'color.ui':
value => true,
}
git::config { 'color.ui':
value => true,
user => bar,
}
```