From 42ad719f4fb8075e42174c287529232c1919fb0e Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 9 Jan 2009 01:03:19 +0000 Subject: fixing variable naming, added gitweb_sitename option --- manifests/defines.pp | 7 ++++++- templates/web/config | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/manifests/defines.pp b/manifests/defines.pp index f7076e4..28910a0 100644 --- a/manifests/defines.pp +++ b/manifests/defines.pp @@ -3,10 +3,15 @@ # projects_list: which repos to export define git::web::repo( $projectroot, - $projects_list + $projects_list, + $sitename='absent', ){ include git::web $gitweb_url = $name + case $gitweb_sitename { + 'absent': { $gitweb_sitename = "${name} git repository" } + default: { $gitweb_sitename = $sitename } + } file{"/etc/gitweb.d/${name}.conf": content => template("git/web/config") } diff --git a/templates/web/config b/templates/web/config index 9bcaac0..5286f6a 100644 --- a/templates/web/config +++ b/templates/web/config @@ -4,7 +4,7 @@ do "/etc/gitweb.conf" if -e "/etc/gitweb.conf"; # Point to projects.list file generated by gitosis. # Here gitosis manages the user "git", who has a # home directory of /srv/example.com/git -$projects_list = "<%= _projects_list %>"; +$projects_list = "<%= projects_list %>"; # Where the actual repositories are located. $projectroot = "<%= projectroot %>"; @@ -28,3 +28,4 @@ $export_ok = "git-daemon-export-ok"; # Easier than having per-repository cloneurl files. @git_base_url_list = ('git://<%= gitweb_url %>'); +$GITWEB_SITENAME = "<%= gitweb_sitename %>" -- cgit v1.2.3