summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Thebo <adrien.thebo@gmail.com>2011-05-23 17:11:45 -0700
committerAdrien Thebo <adrien.thebo@gmail.com>2011-05-23 17:11:45 -0700
commitc63f313fabe1b9a180f1e6f44fbdef43ed18019b (patch)
tree616fbdd299f95bae0d1d021e1d72f3deddb7a701
Initial commit.
-rw-r--r--files/gitweb.conf23
-rw-r--r--manifests/init.pp26
-rw-r--r--templates/apache-gitweb.conf.erb13
3 files changed, 62 insertions, 0 deletions
diff --git a/files/gitweb.conf b/files/gitweb.conf
new file mode 100644
index 0000000..57572d3
--- /dev/null
+++ b/files/gitweb.conf
@@ -0,0 +1,23 @@
+# path to git projects (<project>.git)
+$projectroot = "/var/www/git";
+
+# directory to use for temp files
+$git_temp = "/tmp";
+
+# target of the home link on top of all pages
+#$home_link = $my_uri || "/";
+
+# html text to include at home page
+$home_text = "indextext.html";
+
+# file with project list; by default, simply scan the projectroot dir.
+$projects_list = $projectroot;
+
+# stylesheet to use
+$stylesheet = "/gitweb/gitweb.css";
+
+# logo to use
+$logo = "/gitweb/git-logo.png";
+
+# the 'favicon'
+$favicon = "/gitweb/git-favicon.png";
diff --git a/manifests/init.pp b/manifests/init.pp
new file mode 100644
index 0000000..8ce7605
--- /dev/null
+++ b/manifests/init.pp
@@ -0,0 +1,26 @@
+# Class: gitweb
+#
+# Parameters:
+#
+# Actions:
+#
+# Requires:
+# - puppetlabs-apache
+# Sample Usage:
+class gitweb {
+
+ include apache
+
+ package { "gitweb":
+ ensure => present,
+ }
+
+ file { "/etc/gitweb.conf":
+ ensure => present,
+ owner => "root",
+ group => "root",
+ mode => "0644",
+ source => "puppet:///modules/gitweb/gitweb.conf",
+ require => Package["gitweb"],
+ }
+}
diff --git a/templates/apache-gitweb.conf.erb b/templates/apache-gitweb.conf.erb
new file mode 100644
index 0000000..d0736ae
--- /dev/null
+++ b/templates/apache-gitweb.conf.erb
@@ -0,0 +1,13 @@
+<VirtualHost *:<%= port %>>
+ ServerName <%= name %>
+ DocumentRoot <%= docroot %>
+ <Directory <%= docroot %>>
+ Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
+ AllowOverride All
+ order allow,deny
+ Allow from all
+ AddHandler cgi-script cgi
+ DirectoryIndex gitweb.cgi
+ </Directory>
+</VirtualHost>
+