From 024e73ce96acf59367f5d54aee43cc66298b583d Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 9 Jan 2009 02:13:36 +0000 Subject: fixed config value --- manifests/defines.pp | 7 +++++-- templates/web/lighttpd | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/manifests/defines.pp b/manifests/defines.pp index eea5077..5f71dd5 100644 --- a/manifests/defines.pp +++ b/manifests/defines.pp @@ -12,7 +12,8 @@ define git::web::repo( 'absent': { $gitweb_sitename = "${name} git repository" } default: { $gitweb_sitename = $sitename } } - file{"/etc/gitweb.d/${name}.conf": + $gitweb_config = "/etc/gitweb.d/${name}.conf" + file{"${gitweb_config}": content => template("git/web/config") } case $gitweb_webserver { @@ -21,6 +22,7 @@ define git::web::repo( 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}") } @@ -31,7 +33,8 @@ define git::web::repo( define git::web::repo::lighttpd( $gitweb_url, $projectroot, - $projects_list + $projects_list, + $gitweb_config ){ include git::web::lighttpd file{"/etc/lighttpd/gitweb.d/${name}.conf": diff --git a/templates/web/lighttpd b/templates/web/lighttpd index 621ff79..1153154 100644 --- a/templates/web/lighttpd +++ b/templates/web/lighttpd @@ -11,7 +11,7 @@ $HTTP["host"] == "<%= gitweb_url %>" { ) setenv.add-environment = ( - "GITWEB_CONFIG" => "/etc/gitweb.d/${name}.conf", + "GITWEB_CONFIG" => "<%= gitweb_config %>" ) cgi.assign = ( ".cgi" => "" ) } -- cgit v1.2.3