diff options
author | mh <mh@immerda.ch> | 2009-01-09 00:27:37 +0000 |
---|---|---|
committer | mh <mh@immerda.ch> | 2009-01-09 00:27:37 +0000 |
commit | d3a825d19821ff9318615ac022de89a328c41ccd (patch) | |
tree | 815bfcce3520e2677a56a53f54b63e2074fbe417 /manifests/defines.pp | |
parent | 698014f451130146aec861281747385cca5abf89 (diff) |
added gitwebrepo share possibility for lighttpd
Diffstat (limited to 'manifests/defines.pp')
-rw-r--r-- | manifests/defines.pp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/manifests/defines.pp b/manifests/defines.pp new file mode 100644 index 0000000..93853e1 --- /dev/null +++ b/manifests/defines.pp @@ -0,0 +1,46 @@ +# domain: the domain under which this repo will be avaiable +# projectroot: where the git repos are listened +# projects_list: which repos to export +define git::web::repo( + $gitwebconfig, + $projectroot, + $projects_list +){ + include git::web + $gitweb_url = $name + file{"/etc/gitweb.d/${name}.conf": + content => template("git/web/config") + } + case $gitweb_webserver { + 'lighttpd': { + git::web::repo::lighttpd{$name: + gitwebconfig => $gitwebconfig, + gitweb_url => $gitweb_url, + projectroot => $projectroot, + project_list => $projects_list, + } + } + default: { fail("no supported \$gitweb_webserver defined on ${fqdn}, so can't do git::web::repo: ${name}") } + } + +} + +define git::web::repo::lighttpd( + $gitwebconfig, + $gitweb_url, + $projectroot, + $projects_list +){ + include git::web::lighttpd + file{"/etc/lighttpd/gitweb.d/${name}.conf": + content => template("git/web/lighttpd"), + notify => Service['lighttpd'], + owner => root, group => 0, mode => 0644; + } + line{"add_include_of_gitwebrepo_${name}": + line => "Include /etc/lighttpd/gitweb.d/${name}.conf", + file => "/etc/lighttpd/lighttpd-gitweb.conf", + require => File['/etc/lighttpd/lighttpd-gitweb.conf'], + notify => Service['lighttpd'], + } +} |