From a1b5d4209109b1c3fae9e7b80a1b22bcf3d5211d Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 6 Jul 2010 00:13:38 +0200 Subject: adjust to new lighttpd module --- manifests/web/lighttpd.pp | 5 +---- manifests/web/repo/lighttpd.pp | 18 +++--------------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/manifests/web/lighttpd.pp b/manifests/web/lighttpd.pp index 7c233fa..9534c60 100644 --- a/manifests/web/lighttpd.pp +++ b/manifests/web/lighttpd.pp @@ -1,10 +1,7 @@ class git::web::lighttpd { include ::lighttpd - file{'/etc/lighttpd/conf.d/lighttpd-gitweb.conf': + lighttpd::config::file{'lighttpd-gitweb': content => 'global { server.modules += ("mod_rewrite", "mod_redirect", "mod_alias", "mod_setenv", "mod_cgi" ) }', - require => Package['lighttpd'], - notify => Service['lighttpd'], - owner => root, group => 0, mode => 0644; } } diff --git a/manifests/web/repo/lighttpd.pp b/manifests/web/repo/lighttpd.pp index f5201e7..111cc5e 100644 --- a/manifests/web/repo/lighttpd.pp +++ b/manifests/web/repo/lighttpd.pp @@ -5,20 +5,8 @@ define git::web::repo::lighttpd( ){ if $ensure == 'present' { include git::web::lighttpd } - file{"/etc/lighttpd/conf.d/${name}.gitweb.conf": } - if $ensure == 'present' { - File["/etc/lighttpd/conf.d/${name}.gitweb.conf"]{ - content => template('git/web/lighttpd'), - owner => root, group => 0, mode => 0644 - } - } else { - File["/etc/lighttpd/conf.d/${name}.gitweb.conf"]{ - ensure => $ensure, - } - } - if defined(Service['lighttpd']) { - File["/etc/lighttpd/conf.d/${name}.gitweb.conf"]{ - notify => Service['lighttpd'], - } + lighttpd::vhost::file{$name: + ensure => $ensure, + content => template('git/web/lighttpd'); } } -- cgit v1.2.3