diff options
Diffstat (limited to 'manifests/web')
-rw-r--r-- | manifests/web/repo.pp | 2 | ||||
-rw-r--r-- | manifests/web/repo/lighttpd.pp | 9 |
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"]{ |