summaryrefslogtreecommitdiff
path: root/manifests/web/repo.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/web/repo.pp')
-rw-r--r--manifests/web/repo.pp31
1 files changed, 31 insertions, 0 deletions
diff --git a/manifests/web/repo.pp b/manifests/web/repo.pp
new file mode 100644
index 0000000..8e5f21f
--- /dev/null
+++ b/manifests/web/repo.pp
@@ -0,0 +1,31 @@
+# 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(
+ $projectroot,
+ $projects_list,
+ $sitename='absent'
+){
+ include git::web
+ $gitweb_url = $name
+ case $gitweb_sitename {
+ 'absent': { $gitweb_sitename = "${name} git repository" }
+ default: { $gitweb_sitename = $sitename }
+ }
+ $gitweb_config = "/etc/gitweb.d/${name}.conf"
+ file{"${gitweb_config}":
+ content => template("git/web/config")
+ }
+ case $gitweb_webserver {
+ 'lighttpd': {
+ git::web::repo::lighttpd{$name:
+ gitweb_url => $gitweb_url,
+ projectroot => $projectroot,
+ projects_list => $projects_list,
+ gitweb_config => $gitweb_config,
+ }
+ }
+ default: { fail("no supported \$gitweb_webserver defined on ${fqdn}, so can't do git::web::repo: ${name}") }
+ }
+
+}