From 88ba818826d5107ee7b9ddab1aa9168b2269272f Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 9 Jan 2010 15:25:37 +0100 Subject: don't do web stuff if repo is absent --- manifests/web/repo/lighttpd.pp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'manifests/web/repo') 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"]{ -- cgit v1.2.3