From dae75da745ffbba2cfab1b7f60f686c019c55be5 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 24 May 2010 20:48:07 +0200 Subject: bring lighttpd config in line with lighttpd default --- manifests/web/lighttpd.pp | 18 ++---------------- manifests/web/repo/lighttpd.pp | 24 ++++++------------------ 2 files changed, 8 insertions(+), 34 deletions(-) (limited to 'manifests') diff --git a/manifests/web/lighttpd.pp b/manifests/web/lighttpd.pp index a169dc9..7c233fa 100644 --- a/manifests/web/lighttpd.pp +++ b/manifests/web/lighttpd.pp @@ -1,24 +1,10 @@ class git::web::lighttpd { include ::lighttpd - include lighttpd::base::git::web - file{'/etc/lighttpd/lighttpd-gitweb.conf': - ensure => present, + file{'/etc/lighttpd/conf.d/lighttpd-gitweb.conf': + 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; } - - file{'/etc/lighttpd/gitweb.d': - ensure => directory, - require => Package['lighttpd'], - owner => root, group => 0, mode => 0755; - } -} -class lighttpd::base::git::web inherits lighttpd::base { - File['/etc/lighttpd/lighttpd.conf']{ - source => [ "puppet://$server/modules/site-git/web/${fqdn}/lighttpd.conf", - "puppet://$server/modules/site-git/web/lighttpd.conf", - "puppet://$server/modules/git/web/lighttpd.conf" ], - } } diff --git a/manifests/web/repo/lighttpd.pp b/manifests/web/repo/lighttpd.pp index 6676c4d..f5201e7 100644 --- a/manifests/web/repo/lighttpd.pp +++ b/manifests/web/repo/lighttpd.pp @@ -4,33 +4,21 @@ define git::web::repo::lighttpd( $gitweb_config ){ if $ensure == 'present' { include git::web::lighttpd } - file{"/etc/lighttpd/gitweb.d/${name}.conf": } + + file{"/etc/lighttpd/conf.d/${name}.gitweb.conf": } if $ensure == 'present' { - File["/etc/lighttpd/gitweb.d/${name}.conf"]{ - content => template("git/web/lighttpd"), + File["/etc/lighttpd/conf.d/${name}.gitweb.conf"]{ + content => template('git/web/lighttpd'), owner => root, group => 0, mode => 0644 } } else { - File["/etc/lighttpd/gitweb.d/${name}.conf"]{ + File["/etc/lighttpd/conf.d/${name}.gitweb.conf"]{ ensure => $ensure, } } - line{"include_of_gitwebrepo_${name}": - ensure => $ensure, - line => "include \"gitweb.d/${name}.conf\"", - file => "/etc/lighttpd/lighttpd-gitweb.conf", - } if defined(Service['lighttpd']) { - File["/etc/lighttpd/gitweb.d/${name}.conf"]{ - notify => Service['lighttpd'], - } - Line["include_of_gitwebrepo_${name}"]{ + File["/etc/lighttpd/conf.d/${name}.gitweb.conf"]{ notify => Service['lighttpd'], } } - if defined(File['/etc/lighttpd/lighttpd-gitweb.conf']){ - Line["include_of_gitwebrepo_${name}"]{ - require => File['/etc/lighttpd/lighttpd-gitweb.conf'], - } - } } -- cgit v1.2.3