summaryrefslogtreecommitdiff
path: root/manifests/web
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-01-09 15:25:37 +0100
committermh <mh@immerda.ch>2010-01-09 15:25:37 +0100
commit88ba818826d5107ee7b9ddab1aa9168b2269272f (patch)
treef122cf225a1859cfb586adf35dc85a6f86d45906 /manifests/web
parent9e03ac65f6176029d3f81f2cd0d1b6811ba7e80e (diff)
don't do web stuff if repo is absent
Diffstat (limited to 'manifests/web')
-rw-r--r--manifests/web/repo.pp2
-rw-r--r--manifests/web/repo/lighttpd.pp9
2 files changed, 7 insertions, 4 deletions
diff --git a/manifests/web/repo.pp b/manifests/web/repo.pp
index b9a27da..bf02a93 100644
--- a/manifests/web/repo.pp
+++ b/manifests/web/repo.pp
@@ -10,7 +10,7 @@ define git::web::repo(
if ($ensure == 'present') and (($projects_list == 'absent') or ($projectroot == 'absent')){
fail("You have to pass \$project_list and \$projectroot for ${name} if it should be present!")
}
- include git::web
+ if $ensure == 'present' { include git::web }
$gitweb_url = $name
case $gitweb_sitename {
'absent': { $gitweb_sitename = "${name} git repository" }
diff --git a/manifests/web/repo/lighttpd.pp b/manifests/web/repo/lighttpd.pp
index b6269b1..b7ba9fd 100644
--- a/manifests/web/repo/lighttpd.pp
+++ b/manifests/web/repo/lighttpd.pp
@@ -3,9 +3,12 @@ define git::web::repo::lighttpd(
$gitweb_url,
$gitweb_config
){
- include git::web::lighttpd
- file{"/etc/lighttpd/gitweb.d/${name}.conf":
- notify => Service['lighttpd'],
+ if $ensure == 'present' { include git::web::lighttpd }
+ file{"/etc/lighttpd/gitweb.d/${name}.conf": }
+ if defined(Service['lighttpd']) {
+ File["/etc/lighttpd/gitweb.d/${name}.conf"]{
+ notify => Service['lighttpd'],
+ }
}
if $ensure == 'present' {
File["/etc/lighttpd/gitweb.d/${name}.conf"]{