This module sets all structure need to run git in a server. It's dependent on
puppet-inetd module if you want to use git-daemon.
-The only manual step needed is to load your ssh pubkey into gitosis
-configuration, by doing something like
+The only manual step needed is to load your ssh pubkey into the configuration,
+by doing something like
- sudo -H -u gitosis gitosis-init
+ sudo -H -u git gitolite setup -pk yourkey.pub
class git::daemon (
$implementation = hiera('git::daemon::implementation', 'gitolite')
) {
- # directory for gitosis user and repositories
+ # directory for git user and repositories
file { "/var/git":
ensure => directory,
mode => 0755,
require => File['/usr/local/sbin/git-mass-update-server-info'],
}
- case $implementation {
- 'gitosis': {
- include git::gitosis
- }
- default: {
- include git::gitolite
- }
- }
+ # default implementation
+ include git::gitolite
# the needed packages and services
include inetd
ensure => installed
}
- # make sure this is not installed
- package { "gitosis": ensure => purged }
-
# tries to get rid of ugly directory structure
file { "/srv/gitolite":
ensure => absent,
+++ /dev/null
-# This class handles a gitosis installation, with /var/git as the root for
-# git repositories.
-
-class git::gitosis inherits git {
- # the needed packages
- package { "gitosis": ensure => installed }
-
- # make sure this is not installed
- package { "gitolite": ensure => purged }
-
- # tries to get rid of ugly directory structure
- file { "/srv/gitosis":
- ensure => absent,
- force => true,
- backup => false,
- require => User["git"],
- }
-
- # we also don't need /var/gitosis
- file { "/var/gitosis":
- ensure => absent,
- force => true,
- backup => false,
- require => User["git"],
- }
-}
$home_text = "indextext.html";
# file with project list; by default, simply scan the projectroot dir.
-$projects_list = "/var/git/<% if implementation == 'gitosis' %><%= implementation %>/<% end %>projects.list";
+$projects_list = "/var/git/projects.list";
# stylesheet to use
$stylesheet = "/gitweb.css";