summaryrefslogtreecommitdiff
path: root/manifests/web/repo/lighttpd.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/web/repo/lighttpd.pp')
-rw-r--r--manifests/web/repo/lighttpd.pp36
1 files changed, 8 insertions, 28 deletions
diff --git a/manifests/web/repo/lighttpd.pp b/manifests/web/repo/lighttpd.pp
index 6676c4d..11cee4c 100644
--- a/manifests/web/repo/lighttpd.pp
+++ b/manifests/web/repo/lighttpd.pp
@@ -1,36 +1,16 @@
+# logmode:
+# - default: Do normal logging including ips
+# - anonym: Don't log ips
define git::web::repo::lighttpd(
$ensure = 'present',
$gitweb_url,
+ $logmode = 'default',
$gitweb_config
){
if $ensure == 'present' { include git::web::lighttpd }
- file{"/etc/lighttpd/gitweb.d/${name}.conf": }
- if $ensure == 'present' {
- File["/etc/lighttpd/gitweb.d/${name}.conf"]{
- content => template("git/web/lighttpd"),
- owner => root, group => 0, mode => 0644
- }
- } else {
- File["/etc/lighttpd/gitweb.d/${name}.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}"]{
- notify => Service['lighttpd'],
- }
- }
- if defined(File['/etc/lighttpd/lighttpd-gitweb.conf']){
- Line["include_of_gitwebrepo_${name}"]{
- require => File['/etc/lighttpd/lighttpd-gitweb.conf'],
- }
+
+ lighttpd::vhost::file{$name:
+ ensure => $ensure,
+ content => template('git/web/lighttpd');
}
}