aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/cgit.pp16
-rw-r--r--templates/cgitrc.erb70
2 files changed, 85 insertions, 1 deletions
diff --git a/manifests/cgit.pp b/manifests/cgit.pp
index 217bb5f..7c6512d 100644
--- a/manifests/cgit.pp
+++ b/manifests/cgit.pp
@@ -1,4 +1,10 @@
-class git::cgit {
+class git::cgit(
+ $css = '/cgit-css/cgit.css',
+ $logo = '/cgit.png',
+ $root_title = 'Git Repository Browser',
+ $root_desc = 'a fast webinterface for the git dscm',
+ $clone_url = 'https://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL git://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL git@$HTTP_HOST:$CGIT_REPO_URL'
+) {
package { 'cgit':
ensure => $::lsbdistcodename ? {
'wheezy' => absent,
@@ -10,4 +16,12 @@ class git::cgit {
#package { 'python-pygments':
# ensure => present,
#}
+
+ file { '/etc/cgitrc':
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
+ content => template('git/cgitrc.erb'),
+ }
}
diff --git a/templates/cgitrc.erb b/templates/cgitrc.erb
new file mode 100644
index 0000000..04b8a42
--- /dev/null
+++ b/templates/cgitrc.erb
@@ -0,0 +1,70 @@
+#
+# cgit config
+# see cgitrc(5) for details
+
+css=<%= @css %>
+logo=<%= @logo %>
+
+# title and description
+root-title=<%= @root_title %>
+root-desc=<%= @root_desc %>
+
+# url and snapshots
+clone-url=<%= @clone_url %>
+snapshots=tar.gz tar.bz2
+
+# switches
+nocache=1
+cache-size=0
+enable-http-clone=1
+enable-index-links=1
+enable-http-clone=1
+enable-git-clone=1
+
+# filters
+source-filter=/usr/lib/cgit/filters/syntax-highlighting.py
+about-filter=/usr/lib/cgit/filters/about-formatting.sh
+
+# readme files
+readme=:README.md
+readme=:README.mdwn
+readme=:readme.md
+readme=:README.mkd
+readme=:readme.mkd
+readme=:README.rst
+readme=:readme.rst
+readme=:README.html
+readme=:readme.html
+readme=:README.htm
+readme=:readme.htm
+readme=:README.txt
+readme=:readme.txt
+readme=:README
+readme=:readme
+readme=:INSTALL.md
+readme=:INSTALL.mdwn
+readme=:install.md
+readme=:INSTALL.mkd
+readme=:install.mkd
+readme=:INSTALL.mkd
+readme=:install.mkd
+readme=:INSTALL.rst
+readme=:install.rst
+readme=:INSTALL.html
+readme=:install.html
+readme=:INSTALL.htm
+readme=:install.htm
+readme=:INSTALL.txt
+readme=:install.txt
+readme=:INSTALL
+readme=:install
+readme=:index
+readme=:index.rst
+readme=:index.md
+readme=:index.mdwn
+
+# projects
+enable-git-config=1
+remove-suffix=1
+project-list=/var/git/projects.list
+scan-path=/var/git/repositories/