From c63f313fabe1b9a180f1e6f44fbdef43ed18019b Mon Sep 17 00:00:00 2001 From: Adrien Thebo Date: Mon, 23 May 2011 17:11:45 -0700 Subject: Initial commit. --- files/gitweb.conf | 23 +++++++++++++++++++++++ manifests/init.pp | 26 ++++++++++++++++++++++++++ templates/apache-gitweb.conf.erb | 13 +++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 files/gitweb.conf create mode 100644 manifests/init.pp create mode 100644 templates/apache-gitweb.conf.erb 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 (.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 @@ +> + ServerName <%= name %> + DocumentRoot <%= docroot %> + > + Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch + AllowOverride All + order allow,deny + Allow from all + AddHandler cgi-script cgi + DirectoryIndex gitweb.cgi + + + -- cgit v1.2.3