summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-09-03 09:13:13 +0200
committermh <mh@immerda.ch>2012-09-03 09:13:13 +0200
commit9ae989d30df8778c9c67dded8c1f3211ca46f73c (patch)
tree8a95c6c544393b0b8be05571021e8d9ceebeba75 /manifests
parent36355e5065542a80eea4ca88e042bd9ecd9a86a3 (diff)
downloadpuppet-lighttpd-9ae989d30df8778c9c67dded8c1f3211ca46f73c.tar.gz
puppet-lighttpd-9ae989d30df8778c9c67dded8c1f3211ca46f73c.tar.bz2
only manage things if the file should be present
Diffstat (limited to 'manifests')
-rw-r--r--manifests/vhost/file.pp34
1 files changed, 18 insertions, 16 deletions
diff --git a/manifests/vhost/file.pp b/manifests/vhost/file.pp
index c3f82c1..4b0416a 100644
--- a/manifests/vhost/file.pp
+++ b/manifests/vhost/file.pp
@@ -10,24 +10,26 @@ define lighttpd::vhost::file(
owner => root, group => 0, mode => 0644;
}
- case $content {
- 'absent': {
- File["/etc/lighttpd/vhosts.d/${name}.conf"]{
- source => $vhost_source ? {
- 'absent' => [
- "puppet:///modules/site_lighttpd/vhosts.d/${::fqdn}/${name}.conf",
- "puppet:///modules/site_lighttpd/vhosts.d/${lighttpd::cluster_node}/${name}.conf",
- "puppet:///modules/site_lighttpd/vhosts.d/${::operatingsystem}.${::lsbdistcodename}/${name}.conf",
- "puppet:///modules/site_lighttpd/vhosts.d/${::operatingsystem}/${name}.conf",
- "puppet:///modules/site_lighttpd/vhosts.d/${name}.conf"
- ],
- default => "puppet:///${vhost_source}",
+ if $ensure != 'absent' {
+ case $content {
+ 'absent': {
+ File["/etc/lighttpd/vhosts.d/${name}.conf"]{
+ source => $vhost_source ? {
+ 'absent' => [
+ "puppet:///modules/site_lighttpd/vhosts.d/${::fqdn}/${name}.conf",
+ "puppet:///modules/site_lighttpd/vhosts.d/${lighttpd::cluster_node}/${name}.conf",
+ "puppet:///modules/site_lighttpd/vhosts.d/${::operatingsystem}.${::lsbdistcodename}/${name}.conf",
+ "puppet:///modules/site_lighttpd/vhosts.d/${::operatingsystem}/${name}.conf",
+ "puppet:///modules/site_lighttpd/vhosts.d/${name}.conf"
+ ],
+ default => "puppet:///${vhost_source}",
+ }
}
}
- }
- default: {
- File["/etc/lighttpd/vhosts.d/${name}.conf"]{
- content => $content,
+ default: {
+ File["/etc/lighttpd/vhosts.d/${name}.conf"]{
+ content => $content,
+ }
}
}
}