diff options
author | mh <mh@immerda.ch> | 2010-01-08 00:43:07 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2010-01-08 00:43:07 +0100 |
commit | 28b256e278bcb6d553c656071307f0516cb0fb48 (patch) | |
tree | a908c10af095ef762f791533520b5b65f674e3eb /manifests/web/repo/lighttpd.pp | |
parent | 7b1f9a68e95cd9dc877145eda08c18e233603bb8 (diff) |
make it possible to set a webrepo to absent
Diffstat (limited to 'manifests/web/repo/lighttpd.pp')
-rw-r--r-- | manifests/web/repo/lighttpd.pp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/manifests/web/repo/lighttpd.pp b/manifests/web/repo/lighttpd.pp index adc90e7..f740290 100644 --- a/manifests/web/repo/lighttpd.pp +++ b/manifests/web/repo/lighttpd.pp @@ -1,17 +1,26 @@ define git::web::repo::lighttpd( + ensure = 'present', $gitweb_url, $gitweb_config ){ + file{"/etc/lighttpd/gitweb.d/${name}.conf": } + if $ensure == 'present' { include git::web::lighttpd - file{"/etc/lighttpd/gitweb.d/${name}.conf": + File["/etc/lighttpd/gitweb.d/${name}.conf"]{ content => template("git/web/lighttpd"), notify => Service['lighttpd'], owner => root, group => 0, mode => 0644; } - line{"add_include_of_gitwebrepo_${name}": - line => "include \"gitweb.d/${name}.conf\"", - file => "/etc/lighttpd/lighttpd-gitweb.conf", - require => File['/etc/lighttpd/lighttpd-gitweb.conf'], - notify => Service['lighttpd'], + } else { + File["/etc/lighttpd/gitweb.d/${name}.conf"]{ + ensure => $ensure, } + } + line{"add_include_of_gitwebrepo_${name}": + ensure => $ensure, + line => "include \"gitweb.d/${name}.conf\"", + file => "/etc/lighttpd/lighttpd-gitweb.conf", + require => File['/etc/lighttpd/lighttpd-gitweb.conf'], + notify => Service['lighttpd'], + } } |